ws nginx配置
时间: 2023-11-04 13:00:35 浏览: 43
ws nginx配置如下:
```nginx
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream BackendIotWs {
server 10.0.0.110:7004 weight=1;
}
server {
listen 80;
server_name ws.iot.com;
location / {
try_files $uri $uri/ /index.html last;
root "/usr/local/openresty/nginx/std/manage/";
index index.html index.htm;
}
location /ws/iot {
proxy_pass http://BackendIotWs;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 3600s;
proxy_connect_timeout 86400;
proxy_ignore_client_abort on;
}
}
```
请问还有其他问题吗?