upstream mapserver{
server 192.33.6.13:8080;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server{
listen 6007;
error_log /var/log/nginx/error_6007.log warn;
access_log /var/log/nginx/access_6007.log main;
location / {
proxy_pass http://192.33.6.150:8812;
include conf.d/conf.d/proxy.conf;
}
location /map {
proxy_pass http://mapserver/map;
include conf.d/conf.d/proxy.conf;
}
location /bddptc {
proxy_pass http://192.33.6.67;
include conf.d/conf.d/proxy.conf;
}
location /socket.io {
proxy_pass http://192.33.6.67:5030/socket.io;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X_Forward_For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
Nginx는 소켓 메시지를 전달합니다.
추천
출처blog.csdn.net/lizhihua0625/article/details/124841814
추천
행