How to Enable HAProxy Stats

HAProxy Stats provides a lot of information about data transfer, total connection, server state etc. After installing HAProxy if you want to view HAProxy stats in your web browser, You can easily configure it by making few changes in your HAProxy configuration using following steps.

Step 1: Enable Stats in HAProxy

To enable stats edit your haproxy configuration file and add below entry after defaults section.

listen  stats
        mode            http
        log             global

        maxconn 10

        clitimeout      100s
        srvtimeout      100s
        contimeout      100s
        timeout queue   100s

        stats enable
        stats hide-version
        stats refresh 30s
        stats show-node
        stats auth admin:password
        stats uri  /haproxy?stats

Step 2: Access HAProxy Stats

Your can access HAProxy stats using following url. Change ip with your haproxy server ip address.

 Login user: admin
 Login password: password


Step 3: Change Login Details

If you want to changed login details of HAProxy stats, edit your configuration and update “stats auth” value like below

 stats auth  username:password

Save configuration file and restart HAProxy to update service.

Step 4: Change HAProxy Stats URL

To change url of haproxy stats edit configuration file and update following value.

stats uri  /ha-stats
stats uri  /stats

Save configuration file and restart HAProxy to update service. Now you can access url like or

Haproxy stats configuration has been completed successfully.


Founder of I love to work with Linux and other open source application. Also I like to share knowledge with my friends and other Linux users. Follow me on Twitter, Add me on Google+ or Like Facebook page.

Leave a Reply


Support us!

If you like this site please help and make click on any of these buttons!