server { listen 80; listen [::]:80; root /var/www/public; server_name localhost www.localhost; index index.php index.html; client_max_body_size 500M; client_body_buffer_size 512k; client_body_in_file_only clean; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options "nosniff"; charset utf-8; access_log /var/www/storage/logs/nginx-access.log; error_log /var/www/storage/logs/nginx-error.log; location / { try_files $uri $uri/ /index.php?$query_string; gzip_static on; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } location ~ .*\.(js|css)?$ { expires 1h; error_log off; access_log /dev/null; } error_page 404 /index.php; location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } location ~ /\.ht { deny all; } location ~ /\.(?!well-known).* { deny all; } }