【发布时间】:2015-09-17 13:48:01
【问题描述】:
我完全被这个难住了。我最近在我的站点上安装了 SSL 证书,并且 SSL 在我的负载均衡器 HAProxy 处终止。到目前为止,我所有的普通用户都能够使用安全连接,除了一个主要公司网络后面的用户。
网络背后的人在 Chrome 中收到此消息:
“此网页不可用”“该 https://example.com/ 的网页可能暂时关闭或可能 已永久移至新网址。”
错误代码:ERR_CONNECTION_CLOSED
如果我启用它,他们可以正常访问http://example.com 站点(无 SSL)。
我最初想知道这是否是我的密码问题,但这些企业用户也无法访问静态服务器上的文件(使用带有 SSL 证书的 AWS Cloudfront)。
我猜该公司可能会全面禁止 SSL 证书,除非有白名单?他们可以访问 google 的 ssl 站点 (https://google.com)。我的证书有问题吗? Chrome 有一个绿色锁,说我的网站使用现代密码学。
无论如何,是否有办法确定他们是否无法通过 SSL 访问我的网站,然后将他们重定向到使用非安全版本?我尝试浏览 HAProxy 文档,但遗漏了一些东西,此时有隧道视野。
谢谢大家。这是我的配置文件:
global
tune.ssl.default-dh-param 2048
ssl-default-bind-options no-sslv3
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
mode http
option forwardfor
option http-server-close
option http-pretend-keepalive
timeout client 120s
timeout connect 10s
timeout tunnel 120s
timeout client-fin 120s
timeout server 120s
frontend https-www
bind *:443 ssl crt /etc/ssl/example_com/example.com.pem
#using naked domain
redirect location https://example.com if { hdr_beg(host) -i www }
acl is_sockjs path_beg /sockjs
use_backend sockjs if is_sockjs
default_backend django
frontend all
bind *:80
#How do I detect that the ssl site failed for them?
redirect scheme https if !{ ssl_fc }
backend sockjs
reqadd X-Forwarded-Proto:\ http
balance leastconn
cookie SERV_ID prefix nocache
server srv_sockjs1 sockjsserver-ip check cookie s1
backend django
reqadd X-Forwarded-Proto:\ https
balance roundrobin
server srv_static django-server-ip
backend django-nonssl
reqadd X-Forwarded-Proto:\ http
balance roundrobin
server srv_static django-server-ip
【问题讨论】:
标签: security ssl https haproxy