业精于勤,荒于嬉;行成于思,毁于随。
试试吧来自这里
location /socket.io/ { //此处改为 socket.io 后端的 ip 和端口即可 proxy_pass http://127.0.0.1:3000; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; }
试试吧来自这里