haproxy apache virtual hosts

From: Wayne Egerer <ps2wayne#gmail.com>
Date: Sun, 7 Dec 2008 12:52:18 -0500


Hello,
From what I understand, haproxy should pass the domain over to the two apache webservers and then it should load the correct virtualhost correct?

We pointed the domains A record to the public IP of LB1 though it keeps only loading the two virtualhosts that i setup for the check, that look at /var/www/ its not looking at the virtual containter i setup for the domain. (If i set in the hosts file for it to look at 192.168.0.6, and browse the site from that server and will use the correct virtual container)

Any ideas what I setup wrong?

Our setup >

LB1 (haproxy)

> WEB01 192.168.0.6
> WEB02 192.168.0.7
haproxy.cfg:

global

        log 127.0.0.1   local0 info
        log 127.0.0.1   local1 notice
        #log loghost    local0 info
        maxconn 4096
        #debug
        #quiet
        uid 99
        gid 99
#        user haproxy
#        group haproxy

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

listen webfarm *:80
       mode http
       stats enable
       stats auth someuser:somepassword
       balance roundrobin
       cookie JSESSIONID prefix

       option httpclose
       option forwardfor

       option httpchk HEAD /check.txt HTTP/1.0
       server web1 192.168.0.6:80 cookie A check
       server web2 192.168.0.7:80 cookie B check
Received on 2008/12/07 18:52

This archive was generated by hypermail 2.2.0 : 2008/12/07 19:00 CET