diff --git a/nginx/sites/symfony.conf.example b/nginx/sites/symfony.conf.example index 67967157..acb0aad7 100644 --- a/nginx/sites/symfony.conf.example +++ b/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;