@@ -6,21 +6,32 @@ server {
66 listen 80;
77 listen [::]:80;
88 server_name {domain} www.{domain}; # Change the {domain} as your domain name
9- merge_slashes off;
9+ # merge_slashes off; # Uncomment this line if you want to handle double slashes from php.
1010 root /{domain_path}/; # Change the {domain_path} as your domain root path on this server
1111
1212 add_header X-Frame-Options "SAMEORIGIN";
1313 add_header X-XSS-Protection "1; mode=block";
1414 add_header X-Content-Type-Options "nosniff";
1515
1616 index index.php index.html;
17+ error_page 404 /index.php?q=404;
1718
1819 access_log /{domain_path}/core/storage/logs/nginx-access.log; # Change the {domain_path} as your domain root path on this server
1920 client_max_body_size 512M;
2021
21- error_page 404 /index.php?q=404;
22-
2322 location ~ /\. { access_log off; return 404; }
23+ location ~ ^/assets/\.thumbs/(.*)\.php$ { access_log off; return 404; }
24+ location ~ ^/assets/snippets/summary/(.*)\.php$ { access_log off; return 404; }
25+ location ~ ^/assets/snippets/DocLister/(.*)\.php$ { access_log off; return 404; }
26+ location ~ ^/assets/site/(.*)\.php$ { access_log off; return 404; }
27+ location ~ ^/assets/lib/(.*)\.php$ { access_log off; return 404; }
28+ location ~ ^/assets/js/(.*)\.php$ { access_log off; return 404; }
29+ location ~ ^/assets/import/(.*)\.php$ { access_log off; return 404; }
30+ location ~ ^/assets/images/(.*)\.php$ { access_log off; return 404; }
31+ location ~ ^/assets/files/(.*)\.php$ { access_log off; return 404; }
32+ location ~ ^/assets/export/(.*)\.php$ { access_log off; return 404; }
33+ location ~ ^/assets/docs/(.*)\.php$ { access_log off; return 404; }
34+
2435 location / { try_files $uri $uri/ @rewrite; }
2536 location /manager { rewrite ^/manager/(.*)$ /manager/index.php last; }
2637 location = /favicon.ico { access_log off; log_not_found off; }
0 commit comments