mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14271] Update sample config
PHPBB3-14271
This commit is contained in:
parent
8dbf3976fd
commit
27e95864a8
1 changed files with 12 additions and 3 deletions
|
@ -61,9 +61,17 @@ http {
|
||||||
|
|
||||||
root /path/to/phpbb;
|
root /path/to/phpbb;
|
||||||
|
|
||||||
|
# strip app.php/ prefix if it is present
|
||||||
|
rewrite ^/app\.php/?(.*)$ /$1 permanent;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# phpbb uses index.htm
|
# phpbb uses index.htm
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
try_files $uri @rewriteapp;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewriteapp {
|
||||||
|
rewrite ^(.*)$ /app.php/$1 last;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Deny access to internal phpbb files.
|
# Deny access to internal phpbb files.
|
||||||
|
@ -76,11 +84,12 @@ http {
|
||||||
|
|
||||||
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_pass php;
|
|
||||||
# Necessary for php.
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
||||||
# Unmodified fastcgi_params from nginx distribution.
|
# Unmodified fastcgi_params from nginx distribution.
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
|
# Necessary for php.
|
||||||
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||||
|
fastcgi_pass php;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Deny access to version control system directories.
|
# Deny access to version control system directories.
|
||||||
|
|
Loading…
Add table
Reference in a new issue