vps交流

C#大佬或nginx大佬帮忙看下这是哪方面问题?websocket问题


我系统用的centos7用下面代码装的nginx

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

sudo yum install -y nginx

sudo systemctl start nginx&&sudo systemctl enable nginx

我使用signalR 跨域连接,本地测试没问题,本地html连接我的signalR 本地服务器。
放互联网上。提示这个错误。
Error: Failed to start the transport ‘WebSockets’: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.

这应该不是我代码问题吧?本地测试都ok。
这是因为nginx默认不支持ws么?如果是的话,大概要怎么装ws,复杂么。

赞(0)
版权声明:本贴采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
帖子名称:《C#大佬或nginx大佬帮忙看下这是哪方面问题?websocket问题》
帖子链接:https://bbs.toot.su/71467.html

相关推荐