aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/docs/nginx.sample.conf
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2011-07-11 00:29:45 +0200
committerAndreas Fischer <bantu@phpbb.com>2011-07-11 00:29:45 +0200
commitc8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff (patch)
treeb7e507311afa3db9e372f9d5b8b01455dbd50841 /phpBB/docs/nginx.sample.conf
parent7f21a5f46156660d7ea6a4bdb59166ac553e2be8 (diff)
parente6572b766f7fd5f8547b28fd52d25e4a96cfc2cd (diff)
downloadforums-c8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff.tar
forums-c8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff.tar.gz
forums-c8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff.tar.bz2
forums-c8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff.tar.xz
forums-c8da5ad9f42d8ced1aead79a42cc5caee5c5a2ff.zip
Merge branch 'prep-release-3.0.9'
* prep-release-3.0.9: (359 commits) [prep-release-3.0.9] Bumping version number for 3.0.9 final. [prep-release-3.0.9] Update Changelog for 3.0.9-RC4 release. [prep-release-3.0.9] Decreasing version for an RC4 release. [ticket/9859] Changing all phpBB footers to match the new credit line [ticket/9859] New footer copyright line with registered symbol [ticket/10250] The site_logo hash is different depending on imageset & language [ticket/10250] Destroy cached md5 hash of site_logo on refreshing an imageset [ticket/10250] Overwrite the site_logo width&height when the phpbb logo is used [ticket/10247] Remove attempt_id as primary key from database_update.php [ticket/10250] Added the new phpBB Logo with the Registered Trademark Symbol [ticket/10247] Use COUNT(*) instead of COUNT(attempt_id) [prep-release-3.0.9] Update Changelog for 3.0.9 release. [prep-release-3.0.9] Bumping version number for the final 3.0.9 release. [ticket/10247] Removing attempt_id column from the 3.0.8 to 3.0.9-RC1 updater. [ticket/10247] Add a db_tools test for the removal of a primary key column. [ticket/10247] Add empty data section to database update for RC4 [ticket/10247] Remove unecessary attempt_id primary key column [prep-release-3.0.9] Bump database version to RC3 too. [prep-release-3.0.9] Update Changelog for 3.0.9-RC3 release. [prep-release-3.0.9] Bumping version number for 3.0.9-RC3. ...
Diffstat (limited to 'phpBB/docs/nginx.sample.conf')
-rw-r--r--phpBB/docs/nginx.sample.conf89
1 files changed, 89 insertions, 0 deletions
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
new file mode 100644
index 0000000000..40b6ee76da
--- /dev/null
+++ b/phpBB/docs/nginx.sample.conf
@@ -0,0 +1,89 @@
+# Sample nginx configuration file for phpBB.
+# Global settings have been removed, copy them
+# from your system's nginx.conf.
+# Tested with nginx 0.8.35.
+
+http {
+ # Compression - requires gzip and gzip static modules.
+ gzip on;
+ gzip_static on;
+ 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;
+
+ # 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.
+ server {
+ # 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;
+ }
+
+ # If you have domains with and without www prefix,
+ # redirect one to the other.
+ server {
+ # Default port is 80.
+ #listen 80;
+
+ server_name myforums.com;
+
+ # 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;
+ server_name www.myforums.com;
+
+ root /path/to/phpbb;
+
+ location / {
+ # phpbb uses index.htm
+ index index.php index.html index.htm;
+ }
+
+ # Deny access to internal phpbb files.
+ location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
+ 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.
+ location ~ \.php$ {
+ fastcgi_pass php;
+ # Necessary for php.
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ # Unmodified fastcgi_params from nginx distribution.
+ include fastcgi_params;
+ }
+
+ # Deny access to version control system directories.
+ location ~ /\.svn|/\.git {
+ deny all;
+ internal;
+ }
+ }
+
+ # If running php as fastcgi, specify php upstream.
+ upstream php {
+ server unix:/tmp/php.sock;
+ }
+}