YoBatM commited on
Commit
4367ccd
·
verified ·
1 Parent(s): cabda22

Create nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +35 -0
nginx.conf ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ server {
2
+ listen 4444 default_server;
3
+ listen [::]:4444 default_server;
4
+
5
+ server_name _;
6
+
7
+ location / {
8
+ # Serve Frontend
9
+ proxy_pass http://localhost:7860;
10
+ proxy_http_version 1.1;
11
+ proxy_set_header Upgrade $http_upgrade;
12
+ proxy_set_header Connection 'upgrade';
13
+ proxy_set_header Host $host;
14
+ proxy_set_header X-Real-IP $remote_addr;
15
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
16
+ proxy_cache_bypass $http_upgrade;
17
+ proxy_read_timeout 86400;
18
+ proxy_redirect off;
19
+ }
20
+
21
+ location /static/ {
22
+ # Serve backend from port
23
+ rewrite /static/(.*) /$1 break;
24
+ proxy_pass http://localhost:8000;
25
+ proxy_http_version 1.1;
26
+ proxy_set_header Upgrade $http_upgrade;
27
+ proxy_set_header Connection 'upgrade';
28
+ proxy_set_header Host $host;
29
+ proxy_set_header X-Real-IP $remote_addr;
30
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31
+ proxy_cache_bypass $http_upgrade;
32
+ proxy_read_timeout 86400;
33
+ proxy_redirect off;
34
+ }
35
+ }