aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/docs/nginx.sample.conf
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-02-25 15:34:32 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-02-25 15:34:32 +0100
commit37b2791837425be17bb0703df900bc428a4fbb4b (patch)
tree2a2d40ba89c44721d7342c564f803238d474b9fe /phpBB/docs/nginx.sample.conf
parent49d42e288120d1bbce3a592fb659ddb69e65eed4 (diff)
downloadforums-37b2791837425be17bb0703df900bc428a4fbb4b.tar
forums-37b2791837425be17bb0703df900bc428a4fbb4b.tar.gz
forums-37b2791837425be17bb0703df900bc428a4fbb4b.tar.bz2
forums-37b2791837425be17bb0703df900bc428a4fbb4b.tar.xz
forums-37b2791837425be17bb0703df900bc428a4fbb4b.zip
[ticket/14497] Support second app.php script in install folder
PHPBB3-14497
Diffstat (limited to 'phpBB/docs/nginx.sample.conf')
-rw-r--r--phpBB/docs/nginx.sample.conf25
1 files changed, 24 insertions, 1 deletions
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
index 2ead3552fd..c415720e9c 100644
--- a/phpBB/docs/nginx.sample.conf
+++ b/phpBB/docs/nginx.sample.conf
@@ -62,7 +62,7 @@ http {
root /path/to/phpbb;
location / {
- # phpbb uses index.htm
+ # phpBB uses index.htm
index index.php index.html index.htm;
try_files $uri $uri/ @rewriteapp;
}
@@ -92,6 +92,29 @@ http {
fastcgi_pass php;
}
+ # Correctly pass scripts for installer
+ location /install/ {
+ # phpBB uses index.htm
+ try_files $uri $uri/ @rewrite_installapp;
+
+ # Pass the php scripts to fastcgi server specified in upstream declaration.
+ location ~ \.php(/|$) {
+ # Unmodified fastcgi_params from nginx distribution.
+ include fastcgi_params;
+ # Necessary for php.
+ fastcgi_split_path_info ^(.+\.php)(/.*)$;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
+ fastcgi_param DOCUMENT_ROOT $realpath_root;
+ try_files $uri $uri/ /install/app.php$is_args$args;
+ fastcgi_pass php;
+ }
+ }
+
+ location @rewrite_installapp {
+ rewrite ^(.*)$ /install/app.php/$1 last;
+ }
+
# Deny access to version control system directories.
location ~ /\.svn|/\.git {
deny all;