2017-01-15 6 views
1

포트 80 및 443에서 수신 대기하고 백엔드로 요청을 전달하는 haproxy를 얻으려면 어떻게해야합니까? 80 또는 백엔드 : 443.HAproxy 포트 80 및 443에서 백엔드 : 80 및 백엔드 : 443

더 좋은 방법이 있나요? HAProxy 1.5에이 테스트

frontend http 
    bind 35.154.100.100:80 
    default_backend http_nginx_pool 

frontend https 
    bind 35.154.100.100:443 
    default_backend https_nginx_pool 

backend http_nginx_pool 
    mode tcp 
    server nginx2 10.233.32.143:80 check 

backend https_nginx_pool 
    mode tcp 
    server nginx2 10.233.32.143:443 check 
+0

당신이 무엇을 원하는가 일 "개선?" –

+0

잘 모르겠지만 더 좋은 방법이 있어야한다고 생각했습니다. – Jonathan

답변

2

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 
+0

굉장합니다. 고맙습니다. – Jonathan