|
@@ -1,6 +1,5 @@
|
|
|
upstream backend_servers {
|
|
|
- server 192.168.6.251:8080 max_fails=1 fail_timeout=10s;
|
|
|
- server 192.168.3.251:8080 max_fails=1 fail_timeout=10s;
|
|
|
+ server backend:8080 max_fails=1 fail_timeout=10s;
|
|
|
}
|
|
|
|
|
|
server {
|
|
@@ -39,6 +38,9 @@ server {
|
|
|
proxy_read_timeout 300;
|
|
|
proxy_pass http://backend_servers;
|
|
|
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Upgrade $http_upgrade;
|
|
|
+ proxy_set_header Connection "Upgrade";
|
|
|
# 代理头信息配置
|
|
|
proxy_set_header Host $host;
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|