Jelajahi Sumber

更新 'default.conf'

胡增文 4 bulan lalu
induk
melakukan
3fd6fb49fb
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      default.conf

+ 4 - 2
default.conf

@@ -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;