Fix denied Roundcube nginx locations

This commit is contained in:
Tibor Blaho 2016-03-31 21:07:39 +02:00
parent 252c35c66e
commit 5210db9e8b
1 changed files with 16 additions and 3 deletions

View File

@ -26,9 +26,22 @@
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)/ {
deny all;
}
location ~ ^/mail/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
deny all;
}
location ~ ^/mail/(bin|SQL)/ {
deny all;
}
location ~ ^/mail/(.+\.md)$ {
deny all;
}
location ~ ^/mail/\. {
deny all;
access_log off;
log_not_found off;
}
location ~ /mail/.*\.php {
# note: ~ has precendence over a regular location block