Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've currently got an HaProxy LB solution in place and everything is working fine however we are having an issue with a very few clients who cannot get to our site via HTTPS (SSL) they can browse our site in Http but as soon as they click on an absolute HTTPS link they are taken to our home page instead. Wondering if anyone can look at our config below and see if there's something awry. I believe we are on HaProxy 1.2.17

        log   local0
        log   local1 notice
        #log loghost    local0 info
        maxconn 6144
        user haproxy
        group haproxy

        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        maxconn 2000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000
    stats auth      # admin password

    stats uri       /monitor
listen webfarm
#   bind :80,:443
    bind :443
        mode tcp
        balance source
        #cookie SERVERID insert indirect
        #option httpclose
        #option forwardfor
    #option httpchk HEAD /check.cfm HTTP/1.0
    server webA
        #server webB
    server webB
         server webC

listen webfarmhttp :80
    mode http
    balance source
#   option httpclose
        option forwardfor
#   option httpchk HEAD /check.cfm HTTP/1.0
    option httpchk /check.cfm
    server webA
        #server webB
    server webB
         server webC

listen monitor :8443
        mode http
        balance roundrobin
        #cookie SERVERID insert indirect
        option httpclose
        option forwardfor
        #option httpchk HEAD /check.txt HTTP/1.0
    #option httpchk HEAD /check.cfm HTTP/1.0
    server webA
        server webB
share|improve this question

migrated from stackoverflow.com Dec 9 '10 at 17:15

This question came from our site for professional and enthusiast programmers.

Are you sure HAProxy is the cause here? The way you have it set up, HAP has no idea what is passing through it, so it can't adjust a HTTP header with the URL in. My first suspicion would be one of your servers acting strange. As you have it on source balancing, then that would explain why it only happens to some of your clients and always to just them. Try taking a server at a time out of the pool and testing yourself. –  Richard Benson Aug 2 '11 at 12:17

1 Answer 1

What are you using to cipher/decipher the SSL traffic before haproxy ? Stunnel, nginx, apache, something else ?

I suspect it might be related to the lack of "option httpclose" on your port 80, but it's not clear to me why it would cause an issue to only a few visitors.

share|improve this answer
it won't be the httpclose because he's using tcp balancing. Also, looks like he's hitting HAProxy with the SSL traffic, there is no need to decipher the ssl at all, HAP can handle it with TCP balancing. –  Richard Benson Aug 2 '11 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.