@@ -268,14 +268,30 @@ The **minimum configuration** to get your application running under Nginx is:
268
268
fastcgi_pass unix:/var/run/php5-fpm.sock;
269
269
fastcgi_split_path_info ^(.+\.php)(/.*)$;
270
270
include fastcgi_params;
271
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
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;
279
+ fastcgi_param DOCUMENT_ROOT $realpath_root;
272
280
}
273
281
# PROD
274
282
location ~ ^/app\.php(/|$) {
275
283
fastcgi_pass unix:/var/run/php5-fpm.sock;
276
284
fastcgi_split_path_info ^(.+\.php)(/.*)$;
277
285
include fastcgi_params;
278
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
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;
294
+ fastcgi_param DOCUMENT_ROOT $realpath_root;
279
295
# Prevents URIs that include the front controller. This will 404:
280
296
# http://domain.tld/app.php/some-path
281
297
# Remove the internal directive to allow URIs like this
0 commit comments