bind *:80
bind *:443 ssl crt /etc/haproxy/keys/pod100.com.pem crt /etc/haproxy/keys/wx.podinns.com.pem crt /etc/haproxy/keys/c.pod100.com.pem
acl ssl hdr_reg(host) -i ^(pod100.com)$
#redirect scheme https code 301 if !{ ssl_fc } ssl
acl host_www_pod100.com hdr_beg(host) -i www.pod100.com
redirect prefix http://pod100.com if host_www_pod100.com
acl host_i2.com hdr_beg(host) -i i2.pod100.com
redirect prefix http://pod100.com if host_i2.com
acl host_i3.com hdr_beg(host) -i i3.pod100.com
redirect prefix http://pod100.com if host_i3.com
acl host_i4.com hdr_beg(host) -i i4.pod100.com
redirect prefix http://pod100.com if host_i4.com
acl host_ii.com hdr_beg(host) -i ii.pod100.com
redirect prefix http://pod100.com if host_ii.com
acl www_i2_com hdr_beg(host) -i i2.pod100.com
use_backend www_pod100_com if www_i2_com
acl www_i3_com hdr_beg(host) -i i3.pod100.com
use_backend www_pod100_com if www_i3_com
acl www_i4_com hdr_beg(host) -i i4.pod100.com
use_backend www_pod100_com if www_i4_com
acl www_cpod_com hdr_beg(host) -i c.pod100.com
use_backend www_cpod_com if www_cpod_com
acl www_jm_com hdr_beg(host) -i jm.podinns.com
use_backend www_jm_com if www_jm_com
acl www_pod100_com hdr_beg(host) -i pod100.com
#use_backend www_pod100_com if www_pod100_com { ssl_fc_sni pod100.com }
use_backend www_pod100_com if www_pod100_com
acl www_wx_com hdr_beg(host) -i wx.podinns.com
#use_backend www_wx_com if www_wx_com { ssl_fc_sni wx.podinns.com }
use_backend www_wx_com if www_wx_com
backend www_pod100_com
mode http
server apphost_1 192.168.5.127:80 check inter 2000 fall 3
server apphost_2 192.168.5.129:80 check inter 2000 fall 3
backend www_jm_com
mode http
server apphost_1 192.168.5.151:80 check inter 2000 fall 3
backend www_cpod_com
mode http
server apphost_1 192.168.5.127:80 check inter 2000 fall 3
server apphost_2 192.168.5.129:80 check inter 2000 fall 3
backend www_wx_com
mode http
server apphost_1 192.168.10.99:8001 check inter 2000 fall 3
[root@pd-haproxy keys]#