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

    Its about haproxy

    Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
    4 Posts 2 Posters 1.3k 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.
    • R
      rezgui
      last edited by

      Dear all,

      i installed e haproxy  in my pfsense my problem was when i acced to http://ip-pfsense/haproxy?stats  i have 404 not found

      the test for the configuration file

      haproxy -c -V -f /var/etc/haproxy.cfg

      Configuration file is valid

      start
      sh /usr/local/etc/rc.d/haproxy.sh start
      Starting haproxy.
      but when i see the status ihave

      sh /usr/local/etc/rc.d/haproxy.sh status
      haproxy is not running.

      this my configuration

      global
              maxconn                100
              uid                    80
              gid                    80
              nbproc                  1
              chroot                  /var/empty
              daemon

      listen WEBHA
              bind                    0.0.0.0:80
              mode                    http
              log                    global
              option                  dontlognull
              option                  httpclose
              option                  forwardfor
              maxconn                100
              clitimeout              30000
              balance                roundrobin
              contimeout              30000
              srvtimeout              30000
              retries                3
              stats                  enable
              stats                  uri /haproxy?stats
              stats                  realm  Haproxy\ Statistics
              stats                  auth admin:mypassword
              stats                  refresh 10
              server                  web1 198.252.206.140:80  check inter 1000 weight 1

      thanks in adance

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        i would advice to use haproxy-devel package, it has all and more options, and works rather good imho, also make sure to disable webgui port 80 "WebGUI redirect" in advanced pfsense options as it might be lighttpd that replies instead of haproxy.?. Then check in diagnostics/sockets that haproxy is running and the only one listening on :80

        1 Reply Last reply Reply Quote 0
        • R
          rezgui
          last edited by

          how to disable wbgui port?
          have you  please a tutorial for haproxy?
          thanks

          1 Reply Last reply Reply Quote 0
          • P
            PiBa
            last edited by

            To disable webgui redirect go to: System: Advanced: Admin Access , then check the 'Disable webConfigurator redirect rule' checkbox.

            I don't have a tutorial.. But if you click around a bit it shouldnt be that hard to figure most things out..

            Frontent listens on a ip:port for incomming connections, then uses a backend that contains the webservers to loadbalance between.
            Using multiple shared frontends you can use acl's to add to the existing ip:port and send traffic to a different backend, for example when www.domain.com needs to be handled by a different backend&servers than mail.domain.com , while still listening on 1 port.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.