fix: /admin 404 해결 - alias 경로 수정 및 nginx 설정 적용
All checks were successful
Deploy Nginx Config to Ubuntu Server / deploy (push) Successful in 1s
All checks were successful
Deploy Nginx Config to Ubuntu Server / deploy (push) Successful in 1s
This commit is contained in:
parent
c1690d108e
commit
920672ae1b
@ -45,6 +45,24 @@ server {
|
|||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
# Admin dashboard -> 정적 파일 직접 서빙 (표준 방식)
|
||||||
|
# 참고: frontend-customer와 동일한 패턴 (alias 사용)
|
||||||
|
# /admin은 /보다 먼저 매칭되어야 함
|
||||||
|
location /admin {
|
||||||
|
alias /home/admin/admin-dashboard/frontend/;
|
||||||
|
try_files $uri $uri/ /admin/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;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# First attempt to serve request as file, then
|
# First attempt to serve request as file, then
|
||||||
# as directory, then fall back to displaying a 404.
|
# as directory, then fall back to displaying a 404.
|
||||||
@ -80,23 +98,6 @@ server {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Admin dashboard -> 정적 파일 직접 서빙 (표준 방식)
|
|
||||||
# 참고: frontend-customer와 동일한 패턴 (alias 사용)
|
|
||||||
location /admin {
|
|
||||||
alias /home/admin/admin-dashboard/frontend/;
|
|
||||||
try_files $uri $uri/ /admin/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;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
# RB8001 API endpoints - 51124 서버로 프록시
|
# RB8001 API endpoints - 51124 서버로 프록시
|
||||||
location ^~ /rb8001/ {
|
location ^~ /rb8001/ {
|
||||||
proxy_pass http://192.168.219.52:8001/;
|
proxy_pass http://192.168.219.52:8001/;
|
||||||
@ -183,6 +184,24 @@ server {
|
|||||||
index index.html index.htm index.nginx-debian.html;
|
index index.html index.htm index.nginx-debian.html;
|
||||||
server_name ro-being.com; # managed by Certbot
|
server_name ro-being.com; # managed by Certbot
|
||||||
|
|
||||||
|
# Admin dashboard -> 정적 파일 직접 서빙 (표준 방식)
|
||||||
|
# 참고: frontend-customer와 동일한 패턴 (alias 사용)
|
||||||
|
# /admin은 /보다 먼저 매칭되어야 함
|
||||||
|
location /admin {
|
||||||
|
alias /home/admin/admin-dashboard/frontend/;
|
||||||
|
try_files $uri $uri/ /admin/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;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
# Main application static files
|
# Main application static files
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
@ -217,23 +236,6 @@ server {
|
|||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Admin dashboard -> 정적 파일 직접 서빙 (표준 방식)
|
|
||||||
# 참고: frontend-customer와 동일한 패턴 (alias 사용)
|
|
||||||
location /admin {
|
|
||||||
alias /home/admin/admin-dashboard/frontend/;
|
|
||||||
try_files $uri $uri/ /admin/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;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
# RB8001 API endpoints - 51124 서버로 프록시
|
# RB8001 API endpoints - 51124 서버로 프록시
|
||||||
location ^~ /rb8001/ {
|
location ^~ /rb8001/ {
|
||||||
proxy_pass http://192.168.219.52:8001/;
|
proxy_pass http://192.168.219.52:8001/;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user