gpt4 book ai didi

ssl - 将 http 重定向到 https haproxy 使用 ssl passthrough

转载 作者:可可西里 更新时间:2023-11-01 02:40:52 27 4
gpt4 key购买 nike

这是我的配置

前端 www-http

   bind *:80

option tcplog

default_backend www-backend

mode tcp

前端 www-https

   bind *:443

default_backend www-backend

option tcplog

mode tcp

后端 www-backend

模式TCP

   server web1 192.168.1.191:443 check

server web2 192.168.1.192:443 check backup

我想当用户输入 mysite.com >> https://mysites.com

我在前端使用重定向方案 https if !{ ssl_fc } 作为后端,但它无法达到我的目标。

最佳答案

可能会迟到,但可以执行以下操作:

frontend LB
bind :80 v4v6
mode http
redirect scheme https if !{ ssl_fc }

frontend LBS
bind :443 v4v6
option tcplog
mode tcp
default_backend LBB

backend LBB
mode tcp
balance roundrobin
option ssl-hello-chk
server srv1 server1.example.com:443 check
server srv2 server2.example.com:443 check backup

关于ssl - 将 http 重定向到 https haproxy 使用 ssl passthrough,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30393390/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com