diff --git a/conf/nginx-alldomains.conf b/conf/nginx-alldomains.conf index 1db7606c..2056d5ee 100644 --- a/conf/nginx-alldomains.conf +++ b/conf/nginx-alldomains.conf @@ -26,9 +26,19 @@ index index.php; alias /usr/local/lib/roundcubemail/; } - location ~ /mail/config/.* { - # A ~-style location is needed to give this precedence over the next block. - return 403; + location ~ ^/mail/(config|temp|logs|bin|SQL)/ { + deny all; + } + location ~ ^/mail/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ { + deny all; + } + location ~ ^/mail/(.+\.md|composer\.json.*|package\.xml|Dockerfile)$ { + deny all; + } + location ~ ^/mail/\. { + deny all; + access_log off; + log_not_found off; } location ~ /mail/.*\.php { # note: ~ has precendence over a regular location block