HAProxy community

Can HAproxy perform HTTP Heathcheck?

I’m doing a failover on Site A & Site B when site hit DB error, 404, 500 Internal error and etc error and the site will swing to Site B.

Site A & B was configured on cPanel with SSL installation.

I tried and stuck on the HTTP heath-check part. The HA always return 200 even i stopped the DB service. I would like to ask how i going to check the HTTP heath. Appreciate some one can share the script.


Please read the documentation. There are plenty of possibilities to achieve this, when your backend servers return errors: