HAProxy stats page

  • Hi,

    Thanks in advance for any help or direction you can provide.  I am currently running pfSense 2.1beta and have HAProxy-full package installed.  Everything is working fine except I am unable to access the HAProxy stats page.  I believe I have everything filled in correctly, but when I try to access the HAProxy stats page it goes to the backend web server instead.

    Here's my configuration:

    /var/etc/haproxy.cfg file contents:

    maxconn 9999999
    uid 80
    gid 80
    nbproc 4
    chroot /var/empty

    listen Frontend_HTTP
    bind xxx.xxx.xxx.xxx:80
    cookie SERVERID insert indirect
    mode http
    log global
    option dontlognull
    option httpclose
    option forwardfor
    maxconn 99999
    clitimeout 30000
    balance roundrobin
    contimeout 30000
    srvtimeout 30000
    retries 2
    stats enable
    stats uri /haproxy?stats
    stats realm haproxystats
    stats auth admin:password
    stats refresh 60
    server web1_http  cookie web1  check inter 1000 weight 10
    server web2_http  cookie web2  check inter 1000 weight 20

    Whenever I go to /haproxy?stats the request gets forwarded to one of the backend server instead.  Any ideas?

  • @kevint8:

    Whenever I go to /haproxy?stats the request gets forwarded to one of the backend server instead.  Any ideas?

    Did you changed you internal dns info for this site from internal direct ip to pfsense ip you configured on haproxy?

  • I am accessing the haproxy stats site using pfSense's public IP from a computer outside of the internal network.  The public IP is configured as a VIP on pfSense if that will make a difference.

    I also just tried accessing the haproxy stats site from the internal network, still no go.  I used the pfSense LAN IP.

  • Okay, I am not sure what exactly fixed my issue but this is the sequence of things I tried.  I decided to update to the latest 2.1beta snapshot and that broke my haproxy-full package totally (wasn't able to start the haproxy service).  To fix that issue, I re-install the haproxy-full package but kept my existing configuration.  After the re-install, haproxy service started successfully and I am able to access the haproxy stats page now!

    I hope that will help anyone with similar issue as mine.

Log in to reply