haproxy不会将http重定向到https

时间:2019-11-07 15:25:05

标签: ssl redirect haproxy

如果我直接在https中浏览,我可以在haproxy上进行以下配置,但是效果很好,但是如果在http中这样做,则会超时:

frontend http-frontend
    bind *:80
    redirect scheme https if !{ ssl_fc }

frontend web-ssl
    bind *:443 ssl crt /etc/ssl/my.domain/my.domain.pem
    acl mydomain hdr(host) -i my.domain
    use_backend mydomain if mydomain

backend mydomain
    mode http
    redirect scheme https if !{ ssl_fc }
    server mydomain 10.204.177.89:80

我在做什么错? 谢谢

0 个答案:

没有答案