DOCS/journey/troubleshooting/251020_nginx_skill-email_upstream_fix.md
Claude-51124 22557e7132 docs: 오래된 트러블슈팅 아카이브 및 구조 정리
- 7-8월 초기 구축 문서 12개를 _archive/troubleshooting/2025_07-08_initial_setup/로 이동
- book/300_architecture/390_human_in_the_loop_intent_learning.md를 journey/research/intent_classification/로 이동 (개발 여정 문서)
- 빈 폴더 제거 (journey/assets/*)
2025-11-17 14:06:05 +09:00

1.6 KiB

Nginx skill-email 업스트림 대상 수정

날짜: 2025-10-20
작성자: Claude (51123 서버 관리자)
관련 파일: /etc/nginx/sites-available/default:109-110, /etc/nginx/sites-available/default:245-246


문제 상황

  • DOCS 기준 skill-email 서비스는 51124 서버(192.168.219.52:8501)에서 동작해야 함.
  • Nginx 설정은 /skill-email/ -> http://localhost:8501/로 프록시되어 있었음(51123 로컬 미가동).
  • 원격 상태 확인 결과: 51124(192.168.219.52:8501)/health = 200 OK, 51123 로컬 8501 = 연결 거부.

해결 방안

  • /etc/nginx/sites-available/default 내 두 곳의 업스트림을 원격 51124로 수정.
  • 변경 사항:
    • default:109-110: proxy_pass http://localhost:8501/;proxy_pass http://192.168.219.52:8501/;
    • default:245-246: proxy_pass http://localhost:8501/;proxy_pass http://192.168.219.52:8501/;
  • 검증 절차:
    • nginx -t 구성 테스트 통과 → systemctl reload nginx
    • HTTPS 호스트 헤더로 헬스 체크: curl -k -H 'Host: ro-being.com' https://192.168.219.45/skill-email/health → 200 OK

구현 완료

  • 적용 시각: 2025-10-20 00:06 KST
  • 결과: /skill-email 경로가 51124:8501로 정상 프록시됨. /skill-news, /skill-publish는 외부 프록시 미설정(의도대로 외부 헬스 미노출).

교훈

  • 업스트림 대상은 DOCS(아키텍처/포트 매핑)와 일치해야 함; 수정 전 원격/로컬 헬스 체크로 대상 확인 필수.
  • 내부 스킬 서비스는 외부 노출 불필요(게이트웨이만 외부 노출). 필요 시에도 접근 제한(사설망/ACL) 우선.