server { listen 80 default_server; listen [::]:80 default_server; server_name ${NGINX_SERVER_NAME}; keepalive_timeout 70; client_max_body_size ${NGINX_CLIENT_MAX_BODY_SIZE}; absolute_redirect off; port_in_redirect off; root /var/www/html; index index.php index.html; location ~* ^.+\.(jpg|jpeg|gif|css|html|htm|png|js|webp|avif|svg|mp3|ogg|mp4|mov)$ { access_log off; expires 30d; } error_page 404 /errors/404.html; location / { log_not_found off; rewrite ^(.*)$ /index.php?go=$1 last; } location ~ ^/(system|user)/.*\.php$ { deny all; return 403; } location = /user/settings.json { deny all; return 403; } location = /user/settings.psa { deny all; return 403; } location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTP_HOST $host:${NGINX_EXTERNAL_PORT}; fastcgi_param SERVER_NAME $host; fastcgi_param SERVER_PORT ${NGINX_EXTERNAL_PORT}; fastcgi_param HTTP_X_FORWARDED_HOST $host; fastcgi_param HTTP_X_FORWARDED_PORT ${NGINX_EXTERNAL_PORT}; fastcgi_param HTTP_X_FORWARDED_PROTO $scheme; fastcgi_param E2_SYNTH_URLS true; fastcgi_pass php:9000; fastcgi_index index.php; } location ~ /\.ht { deny all; } location ~ \.psa$ { deny all; } }