【发布时间】:2023-03-31 20:10:02
【问题描述】:
当客户端在我自己配置的 ubuntu nginx 服务器上的不同 wifi(IP 地址)上时,socket.io 无法连接,但在预配置的 heroku 服务器上工作得很好
这是我的 nginx 配置
upstream dirtyfinger {
ip_hash;
server localhost:3000;
server localhost:3001;
server localhost:3002;
server localhost:3003;
}
server {
listen 80;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass "http://dirtyfinger/";
}
}
【问题讨论】:
标签: javascript node.js nginx socket.io multiplayer