【问题标题】:Redirect http to https haproxy use ssl passthrough将 http 重定向到 https haproxy 使用 ssl passthrough
【发布时间】:2015-08-04 06:44:57
【问题描述】:

这是我的配置

前端 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 如果 !{ ssl_fc } 作为后端,但它无法达到我的目标。

【问题讨论】:

标签: ssl tcp haproxy


【解决方案1】:

可能会晚,但以下工作:

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

【讨论】:

    猜你喜欢
    • 2012-10-25
    • 2020-09-24
    • 2015-01-01
    • 2014-10-10
    • 1970-01-01
    • 2012-01-10
    • 2016-01-15
    • 2019-05-17
    • 2017-11-06
    相关资源
    最近更新 更多