From e19c2ea0938d3e4ae5654bff500443945e359741 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 13 Jun 2012 10:59:56 -0400
Subject: [PATCH] - Fixed FS#2220.

---
 server/conf/nginx_vhost.conf.master |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index f68d427..9f13db4 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -105,8 +105,12 @@
             alias /usr/share/awstats/icon;
         }
 
-<tmpl_if name='php' op='==' value='php-fpm'>
         location ~ \.php$ {
+            try_files /non_existing_file.htm @php;
+        }
+
+<tmpl_if name='php' op='==' value='php-fpm'>
+        location @php {
             try_files $uri =404;
             include /etc/nginx/fastcgi_params;
 <tmpl_if name='use_tcp'>
@@ -121,7 +125,7 @@
             fastcgi_intercept_errors on;
         }
 </tmpl_else>
-        location ~ \.php$ {
+        location @php {
             deny all;
         }
 </tmpl_if>
@@ -147,6 +151,10 @@
         location <tmpl_var name='htpasswd_location'> { ##merge##
                 auth_basic "Members Only";
                 auth_basic_user_file <tmpl_var name='htpasswd_path'>.htpasswd;
+				
+                location ~ \.php$ {
+                    try_files /non_existing_file.htm @php;
+                }
         }
 </tmpl_loop>
 	

--
Gitblit v1.9.1