global maxconn 10000 chroot /var/tmp daemon uid 99 gid 99 pidfile /var/run/haproxy.pid frontend vimg bind 0.0.0.0:80 maxconn 10000 mode http # option httpclose clitimeout 10000 reqisetbe ^GET\ /ha_status status reqisetbe ^Host:\ www.xxx.com BACKEND_1 reqisetbe ^Host:\ www.yyy.com BACKEND_2 default_backend BACKEND_1 backend BACKEND_1 fullconn 5000 mode http contimeout 10000 srvtimeout 5000 option redispatch # option httpclose balance roundrobin retries 3 server 10.1.1.151 10.1.1.151:80 check inter 10000 rise 1 fall 3 backend BACKEND_2 fullconn 5000 mode http contimeout 10000 srvtimeout 5000 option redispatch # option httpclose balance roundrobin retries 3 server 10.1.2.161 10.1.2.161:80 check inter 10000 rise 1 fall 3 backend status stats uri / mode http balance roundrobin stats realm backend\ servers'\ status stats auth ha:root