在HAProxy 1.5上进行了测试,效果很好
frontend http-https-in bind 35.154.100.100:80 bind 35.154.100.100:443 use_backend http_nginx_pool if !{ ssl_fc } use_backend https_nginx_pool if { ssl_fc } backend http_nginx_pool mode http server nginx2 10.233.32.143:80 check backend https_nginx_pool mode http server nginx2 10.233.32.143:443 check