50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
# KINTEX 자동전시시스템 — nginx vhost (개발: kintex.zioinfo.co.kr → 101.79.17.164)
|
|
# / → /var/www/kintex (React/Vite SPA, try_files 폴백)
|
|
# /api/, /health → 127.0.0.1:8021 (Spring Boot 백엔드)
|
|
# /ws → 127.0.0.1:8021 (STOMP/WebSocket 업그레이드)
|
|
# TLS(443)는 certbot --nginx -d kintex.zioinfo.co.kr 로 주입(80→443 리다이렉트 자동).
|
|
# 운영 도메인 kintex.wise.ai.kr 은 server_name 추가 또는 별도 vhost 로 후속 구성.
|
|
server {
|
|
listen 80;
|
|
server_name kintex.zioinfo.co.kr;
|
|
|
|
root /var/www/kintex;
|
|
index index.html;
|
|
client_max_body_size 50m;
|
|
|
|
access_log /var/log/nginx/kintex.access.log;
|
|
error_log /var/log/nginx/kintex.error.log;
|
|
|
|
# 백엔드 API
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:8021;
|
|
proxy_http_version 1.1;
|
|
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;
|
|
}
|
|
|
|
# 헬스체크(공개)
|
|
location = /health {
|
|
proxy_pass http://127.0.0.1:8021/health;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
# WebSocket(STOMP) — RenderJob 완료·승인 이벤트 실시간
|
|
location /ws {
|
|
proxy_pass http://127.0.0.1:8021;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
|
|
# 프론트 SPA — 정적 서빙 + 클라이언트 라우팅 폴백
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|