前台是https 443后台就不需要了

来源:互联网 发布:螺旋楼梯计算软件 编辑:程序博客网 时间:2024/06/06 08:54
global
log 127.0.0.1 local3 
maxconn 65535 
chroot /usr/local/haproxy
uid 401
gid 401 
daemon


defaults
log global
mode http
option httplog
option dontlognull
retries 3
option  redispatch
option  abortonclose 
option  httpclose
option  forwardfor


maxconn 65535
timeout connect 5000
timeout client  50000
timeout server 50000


timeout check   5s
stats   refresh 30s
stats   uri     /stats
stats   realm   baison-test-Haproxy     
  stats   auth    admin:zjadmin818
  stats   hide-version 
        frontend   www
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 crt /etc/haproxy/keys/smart.zhotels.cn.pem
        acl ssl  hdr_reg(host) -i ^(wx.podinns.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
 
 ###smart.zhotels.cn
  acl www_zhotels_com  hdr_beg(host)  -i smart.zhotels.cn
       use_backend www_zhotels_com if www_zhotels_com  { ssl_fc_sni smart.zhotels.cn }
 
  backend www_zhotels_com
       mode     http
       server apphost_1192.168.10.161:443   check inter 2000 fall 3
       
  
       
       backend www_pod100_com
       mode     http
       server apphost_1192.168.5.127:80   check inter 2000 fall 3
       server   apphost_2192.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:8080          check inter 2000 fall 3 
      #server apphost_1              192.168.10.99:8001          check inter 2000 fall 3 
阅读全文
0 0
原创粉丝点击