--- date: 2026-03-15 topic: APISIX git push 500 에러 + http-logger 401 에러 해결 areas: - infra/apisix.md - services/gitea.md tags: [history, incident, apisix, gitea, safeline, crowdsec] --- ## git push 500 에러 ### 증상 `gitea.inouter.com`으로 git push 시 BunnyCDN에서 403 반환 (오리진 500) ### 원인 1 — client_body_temp 퍼미션 nginx가 큰 POST body(git pack ~20KB)를 `/usr/local/apisix/client_body_temp/`에 쓸 때 퍼미션 거부. 디렉토리 소유자 `nobody` vs APISIX `apisix` 사용자. 수정: `chown apisix:apisix /usr/local/apisix/client_body_temp` ### 원인 2 — chaitin-waf 글로벌 적용 `chaitin-waf`가 global_rules에 있어서 git pack 바이너리를 SafeLine detector가 파싱 실패 → `mode: block`이면 500 반환. 수정: global_rules에서 `chaitin-waf` 제거, 각 라우트에 개별 적용. gitea 라우트는 git 경로 WAF 제외. ### 교훈 - SafeLine WAF는 바이너리 프로토콜을 처리할 수 없음 → 해당 경로 WAF 제외 필요 - global_rules WAF는 예외 처리가 어려움 → 라우트별 개별 적용이 유연함 ## http-logger 401 에러 서울 APISIX http-logger가 CrowdSec으로 로그 전송 시 401. `headers.Authorization` → `auth_header` 필드로 수정. ## 참조 - `infra/apisix.md` — 현재 APISIX 설정 - `infra/crowdsec-safeline.md` — CrowdSec 로그 연동