location / {#访问socket
client_max_body_size 2000m;
root html;
index index.html index.htm;
proxy_pass http://127.0.0.1:3002;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
目前存在一个问题如果路径写成location /socket/,socketio无法连接目前还没有找到具体问题是出在哪里。