【问题标题】:WebSocket connection failure over Letsencrypt SSL certificateLetsencrypt SSL证书上的WebSocket连接失败
【发布时间】: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


【解决方案1】:

更新解决方案:这是letsencrypt文件的权限问题。

【讨论】:

  • 你能解释一下,你是如何解决权限问题的?
  • @Trevor 您可以简单地将文件权限更改为 775 或 755。
猜你喜欢
  • 1970-01-01
  • 2019-08-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-15
  • 1970-01-01
相关资源
最近更新 更多