1. 配置代码
server {
listen 9900;
server_name 103.108.121.136;
location /ws/ {
# 必须使用http 1.1
proxy_http_version 1.1;
# 设置请求头为ws请求方式
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:9930;
}
}
标签:set,websocket,1.1,header,配置,nginx,proxy,http
From: https://www.cnblogs.com/virgosnail/p/17223918.html