forked from baron/baron-sso
Baron SSO 다중 인스턴스 배포 템플릿
This commit is contained in:
43
deploy/templates/gateway/nginx.conf
Normal file
43
deploy/templates/gateway/nginx.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
worker_processes auto;
|
||||
events { worker_connections 1024; }
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
# 인스턴스별로 계산된 포트 주입
|
||||
upstream backend_srv {
|
||||
server backend:{{BACKEND_PORT}};
|
||||
}
|
||||
|
||||
upstream oathkeeper_srv {
|
||||
server oathkeeper:4455;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
# SSO 메인 도메인 및 API 처리
|
||||
location /api {
|
||||
proxy_pass http://backend_srv;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
location /auth {
|
||||
proxy_pass http://oathkeeper_srv;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location /oidc {
|
||||
rewrite ^/oidc/(.*)$ /$1 break;
|
||||
proxy_pass http://oathkeeper_srv;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
# 기본 정적 파일 (UserFront)
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user