I want to map an application called "page-designer" listening at to the URL Currently I have added the necessary configrations for the front end and backend in the main config file of haproxy.This config is valid but hitting the URL gives me a ERR_CONNECTION_REFUSED.


        log /dev/log    local0
        log /dev/log    local1 notice
        chroot /var/lib/haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
        stats timeout 30s
        user haproxy
        group haproxy

        # Default SSL material locations
        ca-base /etc/ssl/certs
        crt-base /etc/ssl/private

        # Default ciphers to use on SSL-enabled listening sockets.
        # For more information, see ciphers(1SSL). This list is from:
        #  https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
        # An alternative list with additional directives can be obtained from
        #  https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy
        ssl-default-bind-options no-sslv3

        log     global
        mode    http
        option  httplog
        option  dontlognull
        timeout connect 5000
        timeout client  50000
        timeout server  50000
        errorfile 400 /etc/haproxy/errors/400.http
        errorfile 403 /etc/haproxy/errors/403.http
        errorfile 408 /etc/haproxy/errors/408.http
        errorfile 500 /etc/haproxy/errors/500.http
        errorfile 502 /etc/haproxy/errors/502.http
        errorfile 503 /etc/haproxy/errors/503.http
        errorfile 504 /etc/haproxy/errors/504.http

frontend fe_default
    mode http
    acl pagedesigner path_beg -i /page-designer

    use_backend bk_pagedesigner if pagedesigner

backend bk_pagedesigner
    server appserver1
    mode http

Can someone point out what changes i have to make to this config file in order to succesfully map the running app to


Simply put, you're not accepting HTTP connections.

You're only binding to :443 so for http:// (that is, :80), ERR_CONNECTION_REFUSED seems about right if you have no other web server on the host.

The weird part is you're actually expecting HTTP over :443 with that configuration, and hitting confirms that (by the way, thanks for not redacting this 🙏).

You need to add an ssl crt directive to your bind option to properly terminate TLS using HAProxy, or bind to :80 instead.

  • hi i have updated my code – Vignesh Swaminathan Sep 5 '19 at 4:29
  • i changed the bind to :80 instead of 443.But now hitting is giving me 503 Service Unavailable.No server is available to handle this request. – Vignesh Swaminathan Sep 5 '19 at 4:30
  • and right now i want to do this using http instead of ssl – Vignesh Swaminathan Sep 5 '19 at 4:31
  • kindly plz help!! – Vignesh Swaminathan Sep 5 '19 at 4:32
  • If this is quite literally your configuration, I highly doubt you own as an IP for your backend... – Ginnungagap Sep 7 '19 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.