diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index f68d4276f0ca6aa00a0b5b4f26dcbab76b240d7d..9f13db48ef221b22b48d798b030e8faaa6b4969d 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -105,8 +105,12 @@ server { alias /usr/share/awstats/icon; } - location ~ \.php$ { + try_files /non_existing_file.htm @php; + } + + + location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; @@ -121,7 +125,7 @@ server { fastcgi_intercept_errors on; } - location ~ \.php$ { + location @php { deny all; } @@ -147,6 +151,10 @@ server { location { ##merge## auth_basic "Members Only"; auth_basic_user_file .htpasswd; + + location ~ \.php$ { + try_files /non_existing_file.htm @php; + } }