- 운영 리버스 프록시 템플릿(RHEL conf.d, certbot 개별 발급 안내) - dev/prod 공용 /mobile-app QR 페이지(중앙 ITSM APK 저장소 읽기전용 재사용) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
54 lines
2.3 KiB
Plaintext
54 lines
2.3 KiB
Plaintext
# itms.zioinfo.co.kr — ITMS 리버스 프록시 (적용 대기 템플릿)
|
|
# 개발서버 도메인: itms.zioinfo.co.kr → 서버(101.79.17.164, 내부 10.0.1.6)
|
|
#
|
|
# 선결(라이브 조건):
|
|
# 1) Tier2 앱 기동: front(11020) 필수, 필요 시 auth(11000)/api(11010) — 런타임 DB·JDK17·기관 프로파일 확보 환경에서
|
|
# 2) TLS 인증서 발급(itms.zioinfo.co.kr) — 예: certbot --nginx -d itms.zioinfo.co.kr
|
|
# ※ 앱 미기동 상태에서 적용하면 502. 인증서 미발급 시 443 블록의 ssl_certificate 경로부터 맞출 것.
|
|
#
|
|
# 진입점: front(:11020) 가 브라우저 진입점. front 가 auth/api 를 서버측 REST(Unirest)로 경유하므로
|
|
# 일반적으로 front 만 프록시하면 됨. (OAuth 리다이렉트가 브라우저를 auth 로 보내는 구성이면 /oauth 블록 활성화)
|
|
|
|
server {
|
|
listen 80;
|
|
server_name itms.zioinfo.co.kr;
|
|
location / { return 301 https://$host$request_uri; }
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name itms.zioinfo.co.kr;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/itms.zioinfo.co.kr/fullchain.pem; # 발급 후 실제 경로로
|
|
ssl_certificate_key /etc/letsencrypt/live/itms.zioinfo.co.kr/privkey.pem;
|
|
|
|
client_max_body_size 50m;
|
|
|
|
# 통합 메신저 앱 QR 다운로드 페이지(읽기전용, 중앙 ITSM APK 저장소 재사용)
|
|
location = /mobile-app {
|
|
alias /opt/itms/static/mobile-app.html;
|
|
default_type text/html;
|
|
}
|
|
|
|
# 웹 UI (front :11020) — 브라우저 진입점
|
|
location / {
|
|
proxy_pass http://127.0.0.1:11020;
|
|
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;
|
|
proxy_read_timeout 120s;
|
|
}
|
|
|
|
# (선택) OAuth 인가서버 직접 노출이 필요한 구성일 때만 활성화
|
|
# location /oauth/ {
|
|
# proxy_pass http://127.0.0.1:11000;
|
|
# proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme;
|
|
# }
|
|
# (선택) API 직접 노출 — front 가 서버측 경유하면 불필요
|
|
# location /api/ {
|
|
# proxy_pass http://127.0.0.1:11010;
|
|
# proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme;
|
|
# }
|
|
}
|