mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #4978 from ftc2/3.2.x
[ticket/15385] nginx.sample.conf: www redirection, security regex
This commit is contained in:
commit
1744d829ad
1 changed files with 4 additions and 6 deletions
|
@ -18,11 +18,11 @@ http {
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_http_version 1.1;
|
gzip_http_version 1.1;
|
||||||
gzip_min_length 700;
|
gzip_min_length 700;
|
||||||
|
|
||||||
# Compression levels over 6 do not give an appreciable improvement
|
# Compression levels over 6 do not give an appreciable improvement
|
||||||
# in compression ratio, but take more resources.
|
# in compression ratio, but take more resources.
|
||||||
gzip_comp_level 6;
|
gzip_comp_level 6;
|
||||||
|
|
||||||
# IE 6 and lower do not support gzip with Vary correctly.
|
# IE 6 and lower do not support gzip with Vary correctly.
|
||||||
gzip_disable "msie6";
|
gzip_disable "msie6";
|
||||||
# Before nginx 0.7.63:
|
# Before nginx 0.7.63:
|
||||||
|
@ -49,9 +49,7 @@ http {
|
||||||
server_name myforums.com;
|
server_name myforums.com;
|
||||||
|
|
||||||
# A trick from http://wiki.nginx.org/Pitfalls#Taxing_Rewrites:
|
# A trick from http://wiki.nginx.org/Pitfalls#Taxing_Rewrites:
|
||||||
rewrite ^ http://www.myforums.com$request_uri permanent;
|
return 301 http://www.myforums.com$request_uri;
|
||||||
# Equivalent to:
|
|
||||||
#rewrite ^(.*)$ http://www.myforums.com$1 permanent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# The actual board domain.
|
# The actual board domain.
|
||||||
|
@ -72,7 +70,7 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Deny access to internal phpbb files.
|
# Deny access to internal phpbb files.
|
||||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|phpbb|store|vendor) {
|
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
|
||||||
deny all;
|
deny all;
|
||||||
# deny was ignored before 0.8.40 for connections over IPv6.
|
# deny was ignored before 0.8.40 for connections over IPv6.
|
||||||
# Use internal directive to prohibit access on older versions.
|
# Use internal directive to prohibit access on older versions.
|
||||||
|
|
Loading…
Add table
Reference in a new issue