From f5ebf4229f7f24e371dc749fdd9b6c543ff68fab Mon Sep 17 00:00:00 2001 From: Sebastian Paczkowski <74934099+sebpacz@users.noreply.github.com> Date: Sun, 13 Dec 2020 17:27:25 +0100 Subject: [PATCH] Update the Nginx example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I was looking through the Nginx configuration recipe for Symfony 4.x I discovered an important comment that isn’t included in the example in the Nginx section. I think this tip may be useful for those who create their environment using docker containers. In this PR I added the missing comment, which is taken from the recipe on this page: https://www.nginx.com/resources/wiki/start/topics/recipes/symfony/#secure-symfony-4-x. --- setup/web_server_configuration.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index e4fef9b3d99..603a0ba3bbd 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -333,6 +333,9 @@ The **minimum configuration** to get your application running under Nginx is: # Otherwise, PHP's OPcache may not properly detect changes to # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126 # for more information). + # Caveat: When PHP-FPM is hosted on a different machine from nginx + # $realpath_root may not resolve as you expect! In this case try using + # $document_root instead. fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT $realpath_root; # Prevents URIs that include the front controller. This will 404: