diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-03-07 22:01:37 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-03-07 22:01:37 +0100 |
commit | 062c951d3398e3fa2d0b930d84db56ad9bc6de1f (patch) | |
tree | 6d53d5284458b465ae9b6cf75161540e44adbc94 /phpBB/docs/nginx.sample.conf | |
parent | e00a868ce3fa8bfeec48dba36e6359f583dfc285 (diff) | |
parent | 34929033b48a3f5f61d7d793b815f723c8e94a34 (diff) | |
download | forums-062c951d3398e3fa2d0b930d84db56ad9bc6de1f.tar forums-062c951d3398e3fa2d0b930d84db56ad9bc6de1f.tar.gz forums-062c951d3398e3fa2d0b930d84db56ad9bc6de1f.tar.bz2 forums-062c951d3398e3fa2d0b930d84db56ad9bc6de1f.tar.xz forums-062c951d3398e3fa2d0b930d84db56ad9bc6de1f.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10079] Add gallery avatars to .gitignore.
[ticket/10069] Improvements to sample nginx configuration.
Diffstat (limited to 'phpBB/docs/nginx.sample.conf')
-rw-r--r-- | phpBB/docs/nginx.sample.conf | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf index 54a5c316ca..c82f5c8e49 100644 --- a/phpBB/docs/nginx.sample.conf +++ b/phpBB/docs/nginx.sample.conf @@ -18,14 +18,23 @@ http { gzip_vary on; gzip_http_version 1.1; gzip_min_length 700; + + # Compression levels over 6 do not give an appreciable improvement + # in compression ratio, but take more resources. gzip_comp_level 6; - gzip_disable "MSIE [1-6]\."; + + # IE 6 and lower do not support gzip with Vary correctly. + gzip_disable "msie6"; + # Before nginx 0.7.63: + #gzip_disable "MSIE [1-6]\."; # Catch-all server for requests to invalid hosts. # Also catches vulnerability scanners probing IP addresses. - # Should be first. server { - listen 80; + # default specifies that this block is to be used when + # no other block matches. + listen 80 default; + server_name bogus; return 444; root /var/empty; @@ -34,14 +43,20 @@ http { # If you have domains with and without www prefix, # redirect one to the other. server { - listen 80; + # Default port is 80. + #listen 80; + server_name myforums.com; - rewrite ^(.*)$ http://www.myforums.com$1 permanent; + + # A trick from http://wiki.nginx.org/Pitfalls#Taxing_Rewrites: + rewrite ^ http://www.myforums.com$request_uri permanent; + # Equivalent to: + #rewrite ^(.*)$ http://www.myforums.com$1 permanent; } # The actual board domain. server { - listen 80; + #listen 80; server_name www.myforums.com; root /path/to/phpbb; @@ -53,8 +68,10 @@ http { # Deny access to internal phpbb files. location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) { - internal; deny all; + # deny was ignored before 0.8.40 for connections over IPv6. + # Use internal directive to prohibit access on older versions. + internal; } # Pass the php scripts to fastcgi server specified in upstream declaration. @@ -68,8 +85,8 @@ http { # Deny access to version control system directories. location ~ /\.svn|/\.git { - internal; deny all; + internal; } } |