mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10079] Add gallery avatars to .gitignore. [ticket/10069] Improvements to sample nginx configuration.
This commit is contained in:
commit
062c951d33
2 changed files with 26 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@ phpunit.xml
|
||||||
phpBB/cache/*.php
|
phpBB/cache/*.php
|
||||||
phpBB/config.php
|
phpBB/config.php
|
||||||
phpBB/files/*
|
phpBB/files/*
|
||||||
|
phpBB/images/avatars/gallery/*
|
||||||
phpBB/images/avatars/upload/*
|
phpBB/images/avatars/upload/*
|
||||||
phpBB/store/*
|
phpBB/store/*
|
||||||
tests/phpbb_unit_tests.sqlite2
|
tests/phpbb_unit_tests.sqlite2
|
||||||
|
|
|
@ -18,14 +18,23 @@ 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
|
||||||
|
# in compression ratio, but take more resources.
|
||||||
gzip_comp_level 6;
|
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.
|
# Catch-all server for requests to invalid hosts.
|
||||||
# Also catches vulnerability scanners probing IP addresses.
|
# Also catches vulnerability scanners probing IP addresses.
|
||||||
# Should be first.
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
# default specifies that this block is to be used when
|
||||||
|
# no other block matches.
|
||||||
|
listen 80 default;
|
||||||
|
|
||||||
server_name bogus;
|
server_name bogus;
|
||||||
return 444;
|
return 444;
|
||||||
root /var/empty;
|
root /var/empty;
|
||||||
|
@ -34,14 +43,20 @@ http {
|
||||||
# If you have domains with and without www prefix,
|
# If you have domains with and without www prefix,
|
||||||
# redirect one to the other.
|
# redirect one to the other.
|
||||||
server {
|
server {
|
||||||
listen 80;
|
# Default port is 80.
|
||||||
|
#listen 80;
|
||||||
|
|
||||||
server_name myforums.com;
|
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.
|
# The actual board domain.
|
||||||
server {
|
server {
|
||||||
listen 80;
|
#listen 80;
|
||||||
server_name www.myforums.com;
|
server_name www.myforums.com;
|
||||||
|
|
||||||
root /path/to/phpbb;
|
root /path/to/phpbb;
|
||||||
|
@ -53,8 +68,10 @@ 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;
|
||||||
|
# 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.
|
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||||
|
@ -68,8 +85,8 @@ 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;
|
||||||
|
internal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue