Browse Source

Update nginx.conf (#13066)

Shlee 5 months ago
parent
commit
514cd874a7
No account linked to committer's email address
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      dist/nginx.conf

+ 10
- 2
dist/nginx.conf View File

@@ -3,6 +3,14 @@ map $http_upgrade $connection_upgrade {
3 3
   ''      close;
4 4
 }
5 5
 
6
+upstream backend {
7
+    server 127.0.0.1:3000 fail_timeout=0;
8
+}
9
+
10
+upstream streaming {
11
+    server 127.0.0.1:4000 fail_timeout=0;
12
+}
13
+
6 14
 proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=CACHE:10m inactive=7d max_size=1g;
7 15
 
8 16
 server {
@@ -69,7 +77,7 @@ server {
69 77
     proxy_set_header Proxy "";
70 78
     proxy_pass_header Server;
71 79
 
72
-    proxy_pass http://127.0.0.1:3000;
80
+    proxy_pass http://backend;
73 81
     proxy_buffering on;
74 82
     proxy_redirect off;
75 83
     proxy_http_version 1.1;
@@ -93,7 +101,7 @@ server {
93 101
     proxy_set_header X-Forwarded-Proto https;
94 102
     proxy_set_header Proxy "";
95 103
 
96
-    proxy_pass http://127.0.0.1:4000;
104
+    proxy_pass http://streaming;
97 105
     proxy_buffering off;
98 106
     proxy_redirect off;
99 107
     proxy_http_version 1.1;

Loading…
Cancel
Save