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 go from http://sniffyourkid.com and then change the url to http://sniffyourkid.com/blog and it fails to go to apache and instead goes to my other webserver where sniffyourkid.com is. THIS IS INTERMITTENT and sometimes happens more often from www.sniffyourkid.com/ to www.sniffyourkid.com/blog. If I refresh a few times it finally goes to apache. It is soooo weird. In wireshark, I see from the trace, it is incorrectly hitting the wrong webserver AND I see weird TCP out of order packets(not sure if it is important)

# this config needs haproxy-1.1.28 or haproxy-1.2.1

global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 notice
        #log loghost    local0 info
        maxconn 4096
        #chroot /usr/share/haproxy
        user haproxy
        group haproxy
        daemon
        #debug
        #quiet

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        maxconn 2000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000

frontend http_proxy
        bind 0.0.0.0:80
        acl is_blog path_beg /blog
        acl is_stats path_beg /haproxystats
        use_backend cluster2 if is_blog
        use_backend statistics if is_stats
        use_backend cluster1 if !is_blog !is_stats

backend statistics
        stats enable
        stats uri /haproxystats

backend cluster1
        option httpchk
        cookie  SERVERID rewrite
        server  server1 127.0.0.1:9080 cookie inst1cookie check inter 2000 rise 2 fall 5

backend cluster2
        option httpchk
        cookie  SERVERID rewrite
        server  server1 127.0.0.1:8080 cookie inst1cookie check inter 2000 rise 2 fall 5

I think this is the version, right....

root@Sniffy:/etc/haproxy# apt-show-versions haproxy
haproxy/precise uptodate 1.4.18-0ubuntu1
share|improve this question

1 Answer 1

up vote 4 down vote accepted

Your config is missing "option http-server-close" so it works in tunnel mode.

share|improve this answer

Your Answer

 
discard

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

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