Skip to content

Commit 1b2e2e6

Browse files
kendrick-kweaverryan
authored andcommitted
update
1 parent 93a17c8 commit 1b2e2e6

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

cookbook/configuration/web_server_configuration.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,29 @@ The **minimum configuration** to get your application running under Nginx is:
268268
fastcgi_pass unix:/var/run/php5-fpm.sock;
269269
fastcgi_split_path_info ^(.+\.php)(/.*)$;
270270
include fastcgi_params;
271-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
272-
# symlink issue with PHP-FPM and OPcache. Symlink may not be refreshed, so it's necessary to use a real path (eg. after a deployment with Capifony which uses the current symlink to point towards a release directory, you may notice that PHP-FPM displays old pages or freezes) :
271+
# When you are using symlinks to link the document root to the
272+
# current version of your application, you should pass the real
273+
# application path instead of the path to the symlink to PHP
274+
# FPM.
275+
# Otherwise, PHP's OPcache may not properly detect changes to
276+
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
277+
# for more information).
278+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
273279
fastcgi_param DOCUMENT_ROOT $realpath_root;
274280
}
275281
# PROD
276282
location ~ ^/app\.php(/|$) {
277283
fastcgi_pass unix:/var/run/php5-fpm.sock;
278284
fastcgi_split_path_info ^(.+\.php)(/.*)$;
279285
include fastcgi_params;
280-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
281-
# symlink issue with PHP-FPM and OPcache. Symlink may not be refreshed, so it's necessary to use a real path (eg. after a deployment with Capifony which uses the current symlink to point towards a release directory, you may notice that PHP-FPM displays old pages or freezes) :
286+
# When you are using symlinks to link the document root to the
287+
# current version of your application, you should pass the real
288+
# application path instead of the path to the symlink to PHP
289+
# FPM.
290+
# Otherwise, PHP's OPcache may not properly detect changes to
291+
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
292+
# for more information).
293+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
282294
fastcgi_param DOCUMENT_ROOT $realpath_root;
283295
# Prevents URIs that include the front controller. This will 404:
284296
# http://domain.tld/app.php/some-path

0 commit comments

Comments
 (0)