Skip to content

Commit 73178d8

Browse files
Add a health check to the NGINX configuration sample
With the release of the 2.2 version of Magento Varnish has been configured to determine the state of the upstream HTTP proxy with a HTTP probe. This probe polls a script called "health_check.php", located in the pub folder. Unfortunately in the sample configuration, this script is not whitelisted as a PHP executable script, and thus fails to get executed as expected. Varnish then marks the host as down, refusing to serve any traffic. This commit adds the health_check script to the executable PHP block, allowing the varnish proxy to correctly determine the health of the application. Fixes #11157
1 parent 4d26093 commit 73178d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nginx.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ location /media/import/ {
162162
}
163163

164164
# PHP entry point for main application
165-
location ~ (index|get|static|report|404|503)\.php$ {
165+
location ~ (index|get|static|report|404|503|health_check)\.php$ {
166166
try_files $uri =404;
167167
fastcgi_pass fastcgi_backend;
168168
fastcgi_buffers 1024 4k;

0 commit comments

Comments
 (0)