zoukankan      html  css  js  c++  java
  • 前台是https 443后台就不需要了

    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_1 192.168.10.161:443   check inter 2000 fall 3
           
      
           
           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:8080          check inter 2000 fall 3 
          #server apphost_1              192.168.10.99:8001          check inter 2000 fall 3 
  • 相关阅读:
    循环结构
    位运算符
    Switch 选择结构
    if结构和逻辑运算符
    变量和运算符
    [luogu1090 SCOI2003] 字符串折叠(区间DP+hash)
    [luogu2329 SCOI2005] 栅栏(二分+搜索)
    [luogu 4886] 快递员
    [luogu4290 HAOI2008]玩具取名(DP)
    [luogu2624 HNOI2008]明明的烦恼 (prufer+高精)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349690.html
Copyright © 2011-2022 走看看