mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge pull request #4018 from marc1706/ticket/14271
[ticket/14271] Update sample config * marc1706/ticket/14271: [ticket/14271] Properly use try_files in nginx sample config [ticket/14271] Improve try_files and use split path info [ticket/14271] Update sample config
This commit is contained in:
commit
901785bc5e
1 changed files with 13 additions and 4 deletions
|
@ -64,6 +64,11 @@ http {
|
|||
location / {
|
||||
# phpbb uses index.htm
|
||||
index index.php index.html index.htm;
|
||||
try_files $uri $uri/ @rewriteapp;
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
# Deny access to internal phpbb files.
|
||||
|
@ -75,12 +80,16 @@ http {
|
|||
}
|
||||
|
||||
# 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;
|
||||
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/ /app.php$is_args$args;
|
||||
fastcgi_pass php;
|
||||
}
|
||||
|
||||
# Deny access to version control system directories.
|
||||
|
|
Loading…
Add table
Reference in a new issue