Browse Source

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

Modify the sample config to support symfony 4
Yu-Lung Shao (Allen) 7 years ago
parent
commit
8a090f3e46
1 changed files with 7 additions and 1 deletions
  1. 7 1
      nginx/sites/symfony.conf.example

+ 7 - 1
nginx/sites/symfony.conf.example

@@ -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;