Fix incorrect url matches.

This commit is contained in:
Zhang Huangbin 2018-09-12 17:10:53 +08:00
parent f049024e41
commit 6ab52b7879
2 changed files with 16 additions and 16 deletions

View File

@ -256,16 +256,16 @@ __ABOVE__ any existing lines:
```
# Block access to default directories and files under these directories
location ~ /mail/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
location ~ ^/mail/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
# Block access to default files under top-directory and files start with same name.
location ~ /mail/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
location ~ ^/mail/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
# Block plugin config files and sample config files.
location ~ /mail/plugins/.*/config.inc.php.* { deny all; }
location ~ ^/mail/plugins/.*/config.inc.php.* { deny all; }
# Block access to plugin data
location ~ /mail/plugins/enigma/home($|/.*) { deny all; }
location ~ ^/mail/plugins/enigma/home($|/.*) { deny all; }
```
Please open file `/etc/nginx/templates/roundcube-subdomain.tmpl`
@ -274,16 +274,16 @@ Please open file `/etc/nginx/templates/roundcube-subdomain.tmpl`
```
# Block access to default directories and files under these directories
location ~ /(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
location ~ ^/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
# Block access to default files under top-directory and files start with same name.
location ~ /(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
location ~ ^/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
# Block plugin config files and sample config files.
location ~ /plugins/.*/config.inc.php.* { deny all; }
location ~ ^/plugins/.*/config.inc.php.* { deny all; }
# Block access to plugin data
location ~ /plugins/enigma/home($|/.*) { deny all; }
location ~ ^/plugins/enigma/home($|/.*) { deny all; }
```
Open file `/etc/nginx/sites-available/00-default.conf` AND `00-default-ssl.conf`,

View File

@ -287,32 +287,32 @@ Please follow steps below to fix it.</p>
<code>/usr/local/etc/nginx/templates/roundcube.tmpl</code> (FreeBSD), add lines below
<strong>ABOVE</strong> any existing lines:</p>
<pre><code># Block access to default directories and files under these directories
location ~ /mail/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
location ~ ^/mail/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
# Block access to default files under top-directory and files start with same name.
location ~ /mail/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
location ~ ^/mail/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
# Block plugin config files and sample config files.
location ~ /mail/plugins/.*/config.inc.php.* { deny all; }
location ~ ^/mail/plugins/.*/config.inc.php.* { deny all; }
# Block access to plugin data
location ~ /mail/plugins/enigma/home($|/.*) { deny all; }
location ~ ^/mail/plugins/enigma/home($|/.*) { deny all; }
</code></pre>
<p>Please open file <code>/etc/nginx/templates/roundcube-subdomain.tmpl</code>
(Linux/OpenBSD) or <code>/usr/local/etc/nginx/templates/roundcube-subdomain.tmpl</code>
(FreeBSD), add lines below <strong>ABOVE</strong> any existing lines:</p>
<pre><code># Block access to default directories and files under these directories
location ~ /(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
location ~ ^/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; }
# Block access to default files under top-directory and files start with same name.
location ~ /(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
location ~ ^/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; }
# Block plugin config files and sample config files.
location ~ /plugins/.*/config.inc.php.* { deny all; }
location ~ ^/plugins/.*/config.inc.php.* { deny all; }
# Block access to plugin data
location ~ /plugins/enigma/home($|/.*) { deny all; }
location ~ ^/plugins/enigma/home($|/.*) { deny all; }
</code></pre>
<p>Open file <code>/etc/nginx/sites-available/00-default.conf</code> AND <code>00-default-ssl.conf</code>,