【发布时间】:2017-10-20 13:05:44
【问题描述】:
嘿,伙计们,我在 nginx 服务器上的客户端上使用 python tornado websocket 和 angular-websocket 通过letsencrypt证书。上次更新ssl证书后,websocket无法创建连接报错
与“wss://myDomain.com:9999/xyz”的 WebSocket 连接失败:WebSocket 打开握手被取消
我的nginx配置了
location / {
proxy_pass http://unix:/home/ubuntu/run/gunicorn.sock;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/myDomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/myDomain.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
我需要对 nginx 配置进行任何更改吗? 附言- 我已经尝试创建另一个证书,它仍然不起作用。
【问题讨论】:
-
链接应该是
wss://myDomain.com/xyz而不是wss://myDomain.com:9999/xyz我相信,因为 SSL 将在 443 上运行?
标签: ssl nginx websocket tornado lets-encrypt