From 04a73eed52e0ff11be3abd670d007a972d7ade2e Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 28 Jul 2025 22:35:50 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20nginx=20default=5Fserver=20=EB=B8=94?= =?UTF-8?q?=EB=A1=9D=EC=97=90=20=ED=94=84=EB=A1=9D=EC=8B=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 내부망 HTTP 요청 시 프론트엔드가 아닌 API로 정상 프록시되도록 수정 - /api/, /admin, /rb10508/, /rb8001/, /rb10408/, /skill-email/ 경로 추가 - 옵션 1 적용: 첫 번째 server 블록에도 프록시 설정 복사 --- server-nginx-default | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/server-nginx-default b/server-nginx-default index 6b10d32..829627f 100644 --- a/server-nginx-default +++ b/server-nginx-default @@ -51,6 +51,60 @@ server { try_files $uri $uri/ /index.html; } + # API endpoints + location /api/ { + proxy_pass http://localhost:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # Admin dashboard + location /admin { + proxy_pass http://localhost:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # RB10508 API endpoints - 51124 서버로 프록시 + location ^~ /rb10508/ { + proxy_pass http://192.168.219.52:10508/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # RB8001 API endpoints - 51124 서버로 프록시 + location ^~ /rb8001/ { + proxy_pass http://192.168.219.52:8001/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # RB10408 API endpoints (희재님 테스트용) - 51124 서버로 프록시 + location ^~ /rb10408/ { + proxy_pass http://192.168.219.52:10408/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # Skill Email API endpoints + location /skill-email/ { + proxy_pass http://localhost:8501/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + location /.well-known/acme-challenge/ { alias /var/www/html/.well-known/acme-challenge/; }