Skip to content

Commit

Permalink
Add a health check to the NGINX configuration sample
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andrewhowdencom authored Oct 24, 2017
1 parent 4d26093 commit 73178d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nginx.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ location /media/import/ {
}

# PHP entry point for main application
location ~ (index|get|static|report|404|503)\.php$ {
location ~ (index|get|static|report|404|503|health_check)\.php$ {
try_files $uri =404;
fastcgi_pass fastcgi_backend;
fastcgi_buffers 1024 4k;
Expand Down

0 comments on commit 73178d8

Please sign in to comment.