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

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

Scheduled Pinned Locked Moved Cache/Proxy
2 Posts 2 Posters 1.6k Views
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 Nov 28, 2018, 10:30 AM

    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 Nov 28, 2018, 7:06 PM Reply Quote 0
    • P
      PiBa @KennyMacCormik
      last edited by Nov 28, 2018, 7:06 PM

      @kennymaccormik
      Add it to the advanced text box..

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received