[ticket/14271] Improve try_files and use split path info

PHPBB3-14271
This commit is contained in:
Marc Alexander 2015-11-08 11:02:37 +01:00
parent 27e95864a8
commit b27be0b857

View file

@ -83,11 +83,13 @@ http {
}
# Pass the php scripts to fastcgi server specified in upstream declaration.
location ~ \.php$ {
location ~ \.php {
# Unmodified fastcgi_params from nginx distribution.
include fastcgi_params;
# Necessary for php.
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATHINFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_pass php;
}