server { listen 80; listen [::]:80; server_name _; root /var/www/html/public; index index.php; 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; } location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /var/www/html/public$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT /var/www/html/public; fastcgi_pass app:9000; fastcgi_read_timeout 90s; } location ~ /\. { deny all; } }