小编zaj*_*jca的帖子

带有 ssl acl 的 haproxy 多主机

如何在 haproxy (1.5dev19) 中为多个主机使用 ACL 规则,每个主机都有自己的 ssl 证书?

我有 3 个后端,多个域都在一个 IP 地址上。

nodejs (http/https/ws/wss)

nginx (http/https)(现在是 apache 的反向代理)

阿帕奇(http)

我想把 haproxy 放在他们之前,让它为 ssl 连接提供服务。是否可以使用 haproxy acl 或者我必须在 haproxy 前面使用像螺柱这样的东西?

就像是:

frontend http-in
    bind *:80

    acl host_domain1 hdr(host) -i domain1.lt
    use_backend nginx_web_http if host_domain1

frontend http-in
    bind *:443

    acl host_domain1 hdr(host) -i domain1.lt
    use_backend nginx_web_https if host_domain1

backend nginx_web_https
    mode http
    ssl crt /etc/ssl/domain1/ crt ./certs/ prefer-server-cipher
    option httplog
    option httpclose
    server nginx 192.168.2.101:8080 check

backend nginx_web_http
    mode http
    option …
Run Code Online (Sandbox Code Playgroud)

ssl haproxy

6
推荐指数
2
解决办法
3万
查看次数

标签 统计

haproxy ×1

ssl ×1