nginx配置了域名和ssl,使用https已生效,客户端连接使用wss协议连接就失败:无法建立到 wss://caishenzhipai.top:2345/ 服务器的连接。 服务端还需要配置什么吗
location /wss { proxy_pass http://127.0.0.1:8282; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-Real-IP $remote_addr; } 这样配置, 连接中把端口去掉
location /wss
{
proxy_pass http://127.0.0.1:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}
这样配置, 连接中把端口去掉