Spaces:
Paused
Paused
Create nginx.conf
Browse files- nginx.conf +40 -0
nginx.conf
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
map $http_x_request_id $req_id {
|
| 2 |
+
default $http_x_request_id;
|
| 3 |
+
"" $request_id;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
server {
|
| 7 |
+
#listen 4444 http2;
|
| 8 |
+
listen 4444 default_server;
|
| 9 |
+
listen [::]:4444 default_server;
|
| 10 |
+
|
| 11 |
+
server_name _;
|
| 12 |
+
|
| 13 |
+
location / {
|
| 14 |
+
proxy_pass http://localhost:7860;
|
| 15 |
+
proxy_http_version 1.1;
|
| 16 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 17 |
+
proxy_set_header Connection 'upgrade';
|
| 18 |
+
proxy_set_header Host $host;
|
| 19 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 20 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 21 |
+
proxy_cache_bypass $http_upgrade;
|
| 22 |
+
proxy_read_timeout 86400;
|
| 23 |
+
proxy_redirect off;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
location /server/ {
|
| 27 |
+
proxy_set_header x-request-id $req_id;
|
| 28 |
+
proxy_pass http://localhost:7777;
|
| 29 |
+
proxy_http_version 1.1;
|
| 30 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 31 |
+
proxy_set_header Connection 'upgrade';
|
| 32 |
+
proxy_set_header Host $host;
|
| 33 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 34 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 35 |
+
proxy_cache_bypass $http_upgrade;
|
| 36 |
+
proxy_read_timeout 86400;
|
| 37 |
+
proxy_send_timeout 86400;
|
| 38 |
+
proxy_redirect off;
|
| 39 |
+
}
|
| 40 |
+
}
|