title: Controll over the default Cache-Control: no-cache, private Nginx/php-fpm7.4 installation via Laravel Forge service
body: <p>Is there any way of changing the default of the <code>Cache-Control</code> header that is currently set to <code>no-cache, private</code> on all <code>html</code> type files?</p>
  <p>I have tried changing this behavior via <code>nginx.conf</code> as well as via Forge panel, but nothing seems to work for me.</p>
  <p>All other files are cached as they supposed to except the actual <code>html</code></p>
  <pre><code># FORGE CONFIG (DO NOT REMOVE!)
  include forge-conf/www.example.com/before/*;
  
  server {
      listen 443 ssl http2;
      listen [::]:443 ssl http2;
      server_name www.example.com;
      server_tokens off;
      root /home/forge/www.example.com/public;
  
      # FORGE SSL (DO NOT REMOVE!)
      ssl_certificate /etc/nginx/ssl/www.example.com/824182/server.crt;
      ssl_certificate_key /etc/nginx/ssl/www.example.com/824182/server.key;
  
      ssl_protocols TLSv1.2;
      ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
      ssl_prefer_server_ciphers on;
      ssl_dhparam /etc/nginx/dhparams.pem;
      
      add_header Last-Modified $date_gmt;
      if_modified_since off;
      etag off;
      add_header X-Frame-Options &quot;SAMEORIGIN&quot;;
      add_header X-XSS-Protection &quot;1; mode=block&quot;;
      add_header X-Content-Type-Options &quot;nosniff&quot;;
      add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload' always;
  
      index index.html index.htm index.php;
  
      charset utf-8;
  
      # FORGE CONFIG (DO NOT REMOVE!)
      include forge-conf/www.example.com/server/*;
  
      location / {
          try_files $uri $uri/ /index.php?$query_string;
      }
  
      location = /favicon.ico { access_log off; log_not_found off; }
      location = /robots.txt  { access_log off; log_not_found off; }
  
      access_log off;
      error_log  /var/log/nginx/www.example.com-error.log error;
  
      error_page 404 /index.php;
  
      location ~ \.php$ {
          try_files $query_string/index.php =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
          fastcgi_index index.php;
          include fastcgi_params;
      }
      
      # browser caching of static assets
      location ~* \.(ico|css|js|json|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ {   
          expires 30d;                                                                                            
          access_log off;
          add_header Pragma public;
          add_header Cache-Control &quot;public, max-age=2592000&quot;;
      } 
  
      location ~ /\.(?!well-known).* {
          deny all;
      }
  }
  
  # FORGE CONFIG (DO NOT REMOVE!)
  include forge-conf/www.example.com/after/*;
  </code></pre>