Hello,

I have a question to configure health checks in haproxy

default I´m not configure option httpchk in my haproxy configuration. 
webserver1 and webserver2 ist answering. (roundrobin balance) webserver1 is 
down (service httpd stop) and webserver2 is answering without any problems. 
GREAT!

is it right that haproxy checking without any option only tcp connection?

Now I want that haproxy says webserver1 is only healthy if I can read url 
/index.php and not /index.html for example

frontend http
        bind 192.168.36.59:80
        mode http
        option httpclose
       default_backend default

backend default
        option httpchk /index.php
        server web01 192.168.36.57:80 check
        server web02 192.168.36.58:80 check

Now in my opinion http://192.168.36.59/index.html is wrong and no server is 
showing the page. But I can see the page.

How can I configure a health check for really testing the site like only http 
200 ok is showing the page or only /index.php is correct /index.html it´s not ok

Greetings

Reply via email to