arko_renual/deploy/web/csv.wise.ai.kr.conf
URP2026 62ef19c78f
All checks were successful
deploy-dev / deploy (push) Successful in 31s
Gitea 1.22 호환: 워크플로에서 workflow_dispatch 제거
Gitea 1.22.3은 workflow_dispatch(수동 실행)와 inputs 컨텍스트를 지원하지 않아
워크플로가 Actions 목록에 표시되지 않았다. 트리거를 push 하나로 단순화한다.
롤백은 서버에서 직접 수행하도록 README에 절차를 남긴다.

Tomcat 힙도 768m -> 448m로 낮춘다. 가용 메모리 1G 안팎인 서버에서
Tomcat 재기동 직후 서버 전체가 응답 불능이 된 사례가 두 번 있었다.
2026-07-29 17:03:55 +09:00

67 lines
2.5 KiB
Plaintext

# csv.wise.ai.kr — arko_renual 웹 티어 (별도 웹서버에 설치)
#
# 구성: 브라우저 → [웹서버] nginx 443 → [WAS서버 101.79.17.164] Tomcat 8088
# DB는 WAS서버의 MariaDB(csv)를 그대로 사용한다. 웹서버는 DB에 접근하지 않는다.
#
# 설치 위치: /etc/nginx/sites-available/csv.wise.ai.kr.conf
# → /etc/nginx/sites-enabled/ 에 심볼릭 링크
#
# 선행 조건:
# 1) csv.wise.ai.kr A 레코드 → 이 웹서버 IP (현재 미등록)
# 2) WAS서버에서 8088을 이 웹서버 IP에만 개방 (deploy/web/02-was-expose.sh)
# 3) HTTP로 먼저 올린 뒤 certbot --nginx 가 SSL 블록을 주입
# WAS 백엔드 — 설치 시 실제 도달 가능한 주소로 바꿀 것
# 같은 사설망이면 10.0.1.6:8088, 공인망 경유면 101.79.17.164:8088
upstream arko_was {
server 101.79.17.164:8088;
keepalive 16;
}
server {
server_name csv.wise.ai.kr;
# 자원봉사 활동사진·첨부파일 업로드가 있어 기본 1m로는 부족하다
client_max_body_size 100m;
# 개발서버이므로 검색엔진 색인 차단
add_header X-Robots-Tag "noindex, nofollow" always;
access_log /var/log/nginx/csv.wise.ai.kr.access.log;
error_log /var/log/nginx/csv.wise.ai.kr.error.log;
location / {
proxy_pass http://arko_was;
proxy_http_version 1.1;
proxy_set_header Connection "";
# Host를 그대로 넘겨야 WAS가 csv.wise.ai.kr 기준으로 링크를 만든다
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_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
# arko는 첫 요청에서 JSP를 컴파일하고, 통계·엑셀 다운로드가 오래 걸린다
proxy_connect_timeout 60s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
proxy_buffering on;
proxy_buffer_size 16k;
proxy_buffers 8 16k;
}
# 정적 리소스 — 웹서버에서 짧게 캐시 (WAS 왕복을 줄인다)
location ~* ^/(images|css|js|fonts|new)/ {
proxy_pass http://arko_was;
proxy_set_header Host $host;
proxy_cache_valid 200 10m;
expires 10m;
add_header Cache-Control "public, max-age=600";
}
listen 80;
}