socket.io在服务器上部署时nginx的配置不支持websocket的反向代理,故搜寻以及排障结果如下:
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
本人在原基础上加了后面三行