我的网络设置为有一个子域 test.test-domain.de,重定向到 IP NN.NN.NN.NN 到端口 5555。但是浏览子域时,总是会出现 https 状态代码 301。我不明白为什么这不起作用并运行到 301 http 代码,从语法上来说,haproxy 对我来说很难理解。
frontend app-https
mode http
bind abns@app-https accept-proxy ssl crt path_to_pem_file/chain.pem alpn h2,http/1.1
http-request set-header X-Forwarded-Proto https
## routing based on websocket protocol header
acl hdr_connection_upgrade hdr(Connection) -i upgrade
acl hdr_upgrade_websocket hdr(Upgrade) -i websocket
use_backend websocket-servers if hdr_connection_upgrade hdr_upgrade_websocket
maxconn 100000
default_backend app-webserver
frontend app-http
mode http
bind abns@app-http accept-proxy
redirect scheme https code 301