首页 > 解决方案 > 带有 https 后端和 SNI 的 HAProxy

问题描述

请告诉我如何在端口 8443 上实现对后端服务器代理 https 的请求。我的配置不起作用。我收到错误 503。对 http 后端的请求成功。

frontend https_frontend
bind *:443 ssl crt /etc/haproxy/haproxyssl.pem
mode http

tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Ssl on if { ssl_fc }
redirect scheme https if !{ ssl_fc }
use_backend bk_webserver if { ssl_fc_sni webserver.name.com }

backend bk_wscucu
server webserver.name.local 192.168.1.10:8443 check

标签: haproxy

解决方案


推荐阅读