diff --git a/server-nginx-default b/server-nginx-default index 4ad2be0..263692c 100644 --- a/server-nginx-default +++ b/server-nginx-default @@ -80,8 +80,16 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - # Admin dashboard -> route to gateway (host 8100 -> container 8000) + # Admin dashboard -> 정적 파일 직접 서빙 (표준 방식) + # 참고: frontend-customer와 동일한 패턴 (root 사용) location /admin { + root /home/admin/admin-dashboard; + try_files /frontend$uri /frontend$uri/ /frontend/index.html; + index index.html; + } + + # Admin API -> Gateway로 프록시 (JWT 검증 필요) + location /admin/api/ { proxy_pass http://localhost:8100; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -209,8 +217,16 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - # Admin dashboard -> route to gateway (host 8100 -> container 8000) + # Admin dashboard -> 정적 파일 직접 서빙 (표준 방식) + # 참고: frontend-customer와 동일한 패턴 (root 사용) location /admin { + root /home/admin/admin-dashboard; + try_files /frontend$uri /frontend$uri/ /frontend/index.html; + index index.html; + } + + # Admin API -> Gateway로 프록시 (JWT 검증 필요) + location /admin/api/ { proxy_pass http://localhost:8100; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;