关于haproxy多域名证书的配置
frontend main bind *:80 bind *:443 ssl crt /etc/haproxy/kong.com.pem crt /etc/haproxy/51yijI.com.pem no-sslv3 log-format %ci\ %b\ %si:%sp\ %B\ %U\ %ST\ [%r] #mode http acl ssl hdr_reg(host) -i ^(www.51yij.com|api.51yij.com)$ redirect scheme https code 301 if !{ ssl_fc } ssl
####现金贷相关配置
acl url_api hdr(Host) -i api.51yij.com
acl url_auditcallback hdr(Host) -i callback.51yij.com
acl url_awesomeyjj hdr(Host) -i www.51yij.com
acl is_activity path_beg -i /activity
use_backend api if url_api { ssl_fc_sni api.51yij.com }
use_backend auditcallback if url_auditcallback { ssl_fc_sni callback.51yij.com }
use_backend awesome if url_awesomeyjj { ssl_fc_sni www.51yij.com }
use_backend yjj_activity if url_awesomeyjj is_activity { ssl_fc_sni www.51yij.com }
参考文章:
http://www.linuxidc.com/Linux/2015-12/126538.htm
http://fengwan.blog.51cto.com/508652/1719863/