Spaces:
Sleeping
Sleeping
Update nginx.conf
Browse files- nginx.conf +40 -40
nginx.conf
CHANGED
|
@@ -1,40 +1,40 @@
|
|
| 1 |
-
worker_processes 1;
|
| 2 |
-
|
| 3 |
-
pid /tmp/nginx.pid;
|
| 4 |
-
|
| 5 |
-
events { worker_connections 1024; }
|
| 6 |
-
|
| 7 |
-
http {
|
| 8 |
-
include mime.types;
|
| 9 |
-
default_type application/octet-stream;
|
| 10 |
-
|
| 11 |
-
sendfile on;
|
| 12 |
-
keepalive_timeout 65;
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
proxy_set_header X-Forwarded-Proto $scheme;
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
location / {
|
| 37 |
-
try_files $uri $uri/ /index.html;
|
| 38 |
-
}
|
| 39 |
-
}
|
| 40 |
-
}
|
|
|
|
| 1 |
+
worker_processes 1;
|
| 2 |
+
|
| 3 |
+
pid /tmp/nginx.pid;
|
| 4 |
+
|
| 5 |
+
events { worker_connections 1024; }
|
| 6 |
+
|
| 7 |
+
http {
|
| 8 |
+
include mime.types;
|
| 9 |
+
default_type application/octet-stream;
|
| 10 |
+
|
| 11 |
+
sendfile on;
|
| 12 |
+
keepalive_timeout 65;
|
| 13 |
+
|
| 14 |
+
server {
|
| 15 |
+
listen 7860;
|
| 16 |
+
|
| 17 |
+
# Proxy API requests to Flask backend
|
| 18 |
+
location /api/ {
|
| 19 |
+
proxy_pass http://127.0.0.1:7861;
|
| 20 |
+
proxy_set_header Host $host;
|
| 21 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 22 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 23 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
# Serve static files (React UI)
|
| 27 |
+
location / {
|
| 28 |
+
root /usr/share/nginx/html;
|
| 29 |
+
try_files $uri $uri/ /index.html;
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
location / {
|
| 37 |
+
try_files $uri $uri/ /index.html;
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
}
|