How to add 'http-check expect' to HAproxy config in pfSense
-
Hi,
I'm configuring HAproxy's backend. The idea is to perform http checks against certain page and treat some responses as valid. HAproxy offers 'http-check expect' section to do that, but how can I add this section to the config file generated by pfSense?
My current file (/var/etc/haproxy.cfg)
backend ex-owa-backend_ipvANY mode http id 100 log global stats enable stats uri /haproxy?stats stats realm . balance leastconn timeout connect 30000 timeout server 30000 retries 3 option httpchk GET /OWA/HealthCheck.htm server ex1.crpt.local 192.168.60.3:443 id 101 ssl check inter 1000 verify none server ex2.crpt.local 192.168.60.4:443 id 102 ssl check inter 1000 verify none
I expect it to look like following:
backend ex-owa-backend_ipvANY mode http id 100 log global stats enable stats uri /haproxy?stats stats realm . balance leastconn timeout connect 30000 timeout server 30000 retries 3 option httpchk GET /OWA/HealthCheck.htm ***http-check expect rstatus (2|3)[0-9][0-9]*** server ex1.crpt.local 192.168.60.3:443 id 101 ssl check inter 1000 verify none server ex2.crpt.local 192.168.60.4:443 id 102 ssl check inter 1000 verify none
-
@kennymaccormik
Add it to the advanced text box..
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.