server { listen 80; server_name _; root /var/www/html/acepla; index index.php index.html index.htm; server_tokens off; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; location ~* ^(.+)\.(png|jpg|jpeg)$ { add_header Vary Accept; try_files $1.webp $uri =404; expires max; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|webp)$ { expires max; log_not_found off; access_log off; try_files $uri =404; } location ~ /\. { deny all; access_log off; log_not_found off; } location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ { deny all; access_log off; } location ~* \.(engine|inc|info|ini|install|log|make|profile|module|patch|sql|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ { deny all; } location ~* (@fs|etc/passwd|/cgi-bin/) { deny all; access_log off; } location / { try_files $uri $uri/ /index.php?$args; } location /administrator/ { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include fastcgi_params; fastcgi_pass acepla_fpm:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto; fastcgi_param HTTPS 'on'; fastcgi_hide_header X-Powered-By; } }