Merge pull request #1454 from red-smeg/patch-1

Modify the sample config to support symfony 4
This commit is contained in:
Yu-Lung Shao (Allen) 2018-03-29 16:19:21 +08:00 committed by GitHub
commit 8a090f3e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -11,11 +11,17 @@ server {
try_files $uri @rewriteapp;
}
# For Symfony 3
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
# For Symfony 4 config
# location @rewriteapp {
# rewrite ^(.*)$ /index.php/$1 last;
# }
location ~ ^/(app|app_dev|config)\.php(/|$) {
location ~ ^/(app|app_dev|config|index)\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;