nodejs+socket.io用nginx反向代理提示400 Bad Request及ws://…无法连接如何解决
http://www.ihref.com/read-17237.html
修改配置,添加proxy头部分
server {
listen 80;
server_name 123.com www.123.com;
root /www/web/123/public_html;
index index.html index.php index.htm;
location / {
proxy_pass http://127.0.0.1:8000;
......
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}