From d4002338dd859419900842648fbac14c07bf224d Mon Sep 17 00:00:00 2001 From: Brock Tice Date: Wed, 27 May 2015 10:33:24 -0600 Subject: [PATCH] Modify dotfile regex so that it skips over paths including .php files. --- conf/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index bf204a6a..8c0c9a61 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -54,8 +54,8 @@ server { alias /var/lib/mailinabox/mozilla-autoconfig.xml; } - # Disable viewing dotfiles (.htaccess, .svn, .git, etc.) - location ~ /\.(ht|svn|git|hg|bzr) { + # Disable viewing dotfiles (.htaccess, .svn, .git, etc.), but not under php-controlled pages + location ~ ^/(?!.*\.php).*/\.(ht|svn|git|bzr)$ { log_not_found off; access_log off; deny all;