diff --git a/conf/nginx.conf b/conf/nginx.conf index 6dd35045..bf204a6a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -54,6 +54,13 @@ server { alias /var/lib/mailinabox/mozilla-autoconfig.xml; } + # Disable viewing dotfiles (.htaccess, .svn, .git, etc.) + location ~ /\.(ht|svn|git|hg|bzr) { + log_not_found off; + access_log off; + deny all; + } + # Roundcube Webmail configuration. rewrite ^/mail$ /mail/ redirect; rewrite ^/mail/$ /mail/index.php;