Websocket 部署到服务器/域名 连接失败

原因在于Nginx缺少Websocket配置

在server location 中加入

        #启用支持websocket连接
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
原文地址:https://www.cnblogs.com/6324/p/12750407.html