From 3b4469bd4f5da82d4989c7957150014d327bae72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9E=AC=EC=A4=91?= <126754298+m-a-king@users.noreply.github.com> Date: Mon, 10 Aug 2026 23:07:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20nginx=20=ED=94=84=EB=A1=A0=ED=8A=B8?= =?UTF-8?q?=EA=B0=80=20upstream=20=EC=9D=B4=EB=A6=84=EC=9D=84=20Host=20?= =?UTF-8?q?=EB=A1=9C=20=EB=84=98=EA=B2=A8=20Tomcat=20400=20-=20Host=20?= =?UTF-8?q?=ED=97=A4=EB=8D=94=20=EB=AA=85=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 이행 배포 실측: proxy_set_header Host 부재 시 nginx 가 upstream 이름(piki_extractor)을 Host 로 전달하고, Tomcat 이 언더스코어 도메인을 400 으로 거절해 프론트 전체가 400 이 됐다 (원복 로직이 새 슬롯을 정리한 상태에서 레거시는 이미 제거된 이행 1회차라 약 10분 다운타임) - 박스에는 동일 수정을 핫픽스로 이미 적용해 복구 완료 - 이 커밋은 repo 정본을 박스와 일치시켜 다음 배포가 conf 를 덮어도 재발하지 않게 한다 - 검증: 같은 슬롯에 Host 정상=200 / Host piki_extractor=400 실측으로 원인 확정, 수정 conf 는 docker nginx -t 통과 --- infra/nginx/extractor.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infra/nginx/extractor.conf b/infra/nginx/extractor.conf index 64148ee..d1846a6 100644 --- a/infra/nginx/extractor.conf +++ b/infra/nginx/extractor.conf @@ -19,6 +19,10 @@ server { location / { proxy_pass http://piki_extractor; + # Host 를 명시하지 않으면 nginx 가 upstream 이름(piki_extractor)을 Host 로 넘기는데, + # Tomcat 은 언더스코어 도메인을 400 으로 거절한다 - 이행 배포에서 프론트 전체가 400 이 된 + # 실측 사고(2026-08-10). core conf 는 upstream 이름에 언더스코어가 없어 우연히 무사했던 함정. + proxy_set_header Host $host; # keepalive 재사용을 위해 1.1 + Connection 헤더 초기화 (요청마다 upstream 재연결 방지) proxy_http_version 1.1; proxy_set_header Connection "";