Modify dotfile regex so that it skips over paths including .php files.

This commit is contained in:
Brock Tice 2015-05-27 10:33:24 -06:00
parent d6f26609fc
commit d4002338dd
1 changed files with 2 additions and 2 deletions

View File

@ -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;