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;