mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10007] Add directive 'internal' to blocked folders in nginx config.
The "deny" and "access" directives are IP-based in general. Both directives only support IPv6 from nginx 0.8.22 onwards, on older versions of nginx those directives have no effect on IPv6 requests. Thus they do not block access for IPv6 requests. Adding the "internal" directive blocks external access in general (both IPv4 and IPv6) and makes the web server return a status code 404 (Not Found) response. See: http://nginx.org/en/CHANGES http://wiki.nginx.org/HttpCoreModule#internal PHPBB3-10007
This commit is contained in:
parent
e1e84f9bd0
commit
a970219d61
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,7 @@ http {
|
||||||
|
|
||||||
# Deny access to internal phpbb files.
|
# Deny access to internal phpbb files.
|
||||||
location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
|
location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
|
||||||
|
internal;
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ http {
|
||||||
|
|
||||||
# Deny access to version control system directories.
|
# Deny access to version control system directories.
|
||||||
location ~ /\.svn|/\.git {
|
location ~ /\.svn|/\.git {
|
||||||
|
internal;
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue