websocket没法链接到nginx代理的服务器

今天在使用websoket的时候,发现没法链接到nginx代理的服务器,最后的解决办法是在nginx的配置文件里面加上下面这个配置location /websocket:nginx

location /websocket {
    proxy_pass  http://ip:端口;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";web

服务器

相关文章
相关标签/搜索