oceddyyy commited on
Commit
b0e311c
·
verified ·
1 Parent(s): f26a829

Update nginx.conf

Browse files
Files changed (1) hide show
  1. 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
- # Use /tmp for temp files to avoid permission issues
15
- client_body_temp_path /tmp/client_temp;
16
- proxy_temp_path /tmp/proxy_temp;
17
- fastcgi_temp_path /tmp/fastcgi_temp;
18
- uwsgi_temp_path /tmp/uwsgi_temp;
19
- scgi_temp_path /tmp/scgi_temp;
20
-
21
- server {
22
- listen 7860;
23
- server_name localhost;
24
-
25
- root /usr/share/nginx/html;
26
- index index.html index.htm;
27
-
28
- location /api/ {
29
- proxy_pass http://127.0.0.1:7861;
30
- proxy_set_header Host $host;
31
- proxy_set_header X-Real-IP $remote_addr;
32
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
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
+ }