feat: nginx default_server 블록에 프록시 설정 추가
All checks were successful
Deploy Nginx Config to Ubuntu Server / deploy (push) Successful in 3s

- 내부망 HTTP 요청 시 프론트엔드가 아닌 API로 정상 프록시되도록 수정
- /api/, /admin, /rb10508/, /rb8001/, /rb10408/, /skill-email/ 경로 추가
- 옵션 1 적용: 첫 번째 server 블록에도 프록시 설정 복사
This commit is contained in:
happybell80 2025-07-28 22:35:50 +09:00
parent 4b96f1e3b1
commit 04a73eed52

View File

@ -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/;
}