-
-
Save ljay79/145a31869ee0446f0e43a34e0f16a826 to your computer and use it in GitHub Desktop.
Magento load balancer health check script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include './app/Mage.php'; | |
try { | |
Mage::app(); | |
// echo gethostname(); | |
echo $_SERVER["SERVER_ADDR"]; // local IP, for instances behind ELB | |
} Catch (Exception $e) { | |
header("HTTP/1.0 503 Service Unavailable"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment