@@ -14,43 +14,54 @@ server {
1414
1515 include % home% /% user% /conf/web/% domain% /nginx.forcessl.conf*;
1616
17+ location = /favicon.ico {
18+ log_not_found off;
19+ access_log off;
20+ }
21+
22+ location = /robots.txt {
23+ allow all;
24+ log_not_found off;
25+ access_log off;
26+ }
27+
28+ location ~ /\.(?!well-known\/) {
29+ deny all;
30+ return 404;
31+ }
32+
33+ location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
34+ deny all;
35+ return 404;
36+ }
37+
1738 location / {
1839 try_files $uri $uri / /index.php;
19-
20- location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
21- expires max;
40+ location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
41+ expires 30d;
2242 fastcgi_hide_header " Set-Cookie" ;
2343 }
2444
2545 location ~ [^/]\.php(/|$) {
2646 fastcgi_param SCRIPT_FILENAME $document_root $fastcgi_script_name ;
27- if (! -f $document_root $fastcgi_script_name ) {
28- return 404;
29- }
30-
31- fastcgi_pass %backend_lsnr%;
32- fastcgi_index index.php;
33- include /etc/nginx/fastcgi_params;
34- include /etc/nginx/fastcgi_params;
35- include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
47+ try_files $uri =404;
48+ fastcgi_pass % backend_lsnr% ;
49+ fastcgi_index index.php;
50+ include /etc/nginx/fastcgi_params;
51+ include % home% /% user% /conf/web/% domain% /nginx.fastcgi_cache.conf*;
3652 }
3753 }
3854
3955 location /error/ {
4056 alias % home% /% user% /web/% domain% /document_errors/;
4157 }
4258
43- location ~ /\.(?!well-known\/) {
44- deny all;
45- return 404;
46- }
47-
4859 location /vstats/ {
4960 alias % home% /% user% /web/% domain% /stats/;
5061 include % home% /% user% /web/% domain% /stats/auth.conf*;
5162 }
5263
53- include /etc/nginx/conf.d/phpmyadmin.inc*;
54- include /etc/nginx/conf.d/phppgadmin.inc*;
55- include %home%/%user%/conf/web/%domain%/nginx.conf_*;
64+ include /etc/nginx/conf.d/phpmyadmin.inc*;
65+ include /etc/nginx/conf.d/phppgadmin.inc*;
66+ include %home%/%user%/conf/web/%domain%/nginx.conf_*;
5667}
0 commit comments