因为系统需要websocket通信,但是服务器的nginx版本太低,无法解析websoket请求,需要升级。
升级后nginx主要配置为location / {
root html;
index index.html index.htm;
proxy_pass http://localhost:8809/;
proxy_set_header Host $host;
proxy_http_version 1.1;
#proxy_set_header X-Client-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;