From e14b2826e0601684bbbeb773ae125b794b0a05ab Mon Sep 17 00:00:00 2001 From: BiZoNiX Date: Mon, 9 Feb 2015 19:41:42 +0200 Subject: [PATCH] Disable viewing dotfiles (.htaccess, .svn, .git, etc.) --- conf/nginx.conf | 7 +++++++ 1 file changed, 7 insertions(+) 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;