Pommsn commited on
Commit
e5b8333
·
verified ·
1 Parent(s): b5ab944

Update nginx.conf

Browse files
Files changed (1) hide show
  1. nginx.conf +7 -6
nginx.conf CHANGED
@@ -1,17 +1,18 @@
1
  server {
2
  listen 7860;
3
-
4
- # ส่งคำขอที่ป็น API ไปาตัวมอหลังบ้าน (พอร์ต 5001)
5
  location ~ ^/(console/api|api|v1|files|install) {
6
  proxy_pass http://127.0.0.1:5001;
7
  proxy_set_header Host $host;
 
8
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
9
  }
10
 
11
- # ส่วนที่เหลือให้ดึงไฟล์หน้าเว็บจาโฟลเดอร์มาแสดง
12
  location / {
13
- root /app/web/out;
14
- index index.html;
15
- try_files $uri $uri/ /index.html;
16
  }
17
  }
 
1
  server {
2
  listen 7860;
3
+
4
+ # ถ้ารียก API ไปพอร์ต 5001
5
  location ~ ^/(console/api|api|v1|files|install) {
6
  proxy_pass http://127.0.0.1:5001;
7
  proxy_set_header Host $host;
8
+ proxy_set_header X-Real-IP $remote_addr;
9
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
10
  }
11
 
12
+ # ถ้ารียกหน้าเว็บติ ให้ส่งไปพอร์ต 3000
13
  location / {
14
+ proxy_pass http://127.0.0.1:3000;
15
+ proxy_set_header Host $host;
16
+ proxy_set_header X-Real-IP $remote_addr;
17
  }
18
  }