Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    How to add 'http-check expect' to HAproxy config in pfSense

    Cache/Proxy
    2
    2
    975
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      KennyMacCormik last edited by

      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
      
      P 1 Reply Last reply Reply Quote 0
      • P
        PiBa @KennyMacCormik last edited by

        @kennymaccormik
        Add it to the advanced text box..

        1 Reply Last reply Reply Quote 0
        • First post
          Last post