Web Server(28)
-
proxy를 사용할 때, client IP를 backend에 전달하기
# nginx.confserver { listen 80; server_name my-backend.com; location / { proxy_pass http://backend-server:8080; # Preserve client IP 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; # Preserve original host proxy_set_header Host $host; }}# ..
2025.03.04 -
페이지가 작동하지 않습니다. {도메인}에서 리디렉션한 횟수가 너무 많습니다.
원인nginx에서 ingress nginx controller로 proxy 처리했을 때, nginx에서 http로 전달하면 ingress nginx controller에서 https로 redirect하면서 무한 반복하게 됨조치nginx에서 proxy할 때 https로 전달하게 함
2025.03.01 -
nginx 413 Payload Too Large
Docker registry is rejecting large image uploads due to a file size limit.Nginx: client_max_body_size 2G; # Allow up to 2GB uploads# nginx.confserver { listen 443 ssl; server_name registry.temp.co.kr; client_max_body_size 2G; # Allow up to 2GB uploads location / { proxy_pass http://registry:5000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_a..
2025.02.26 -
nginx proxy 404 에러 발생할 때 확인 사항
proxy_set_header Host $host;가 설정되어 있지 않으면 발생할 수 있음 location / { proxy_pass http://192.168.1.241; #proxy_set_header Host $host; }
2025.02.25 -
Nginx ubuntu에 컴파일시 확인 사항
checking for sys/filio.h ... not foundsudo apt updatesudo apt install build-essential libpcre3-dev zlib1g-dev libssl-dev checking for /dev/poll ... not found--with-cc-opt="-DNGX_HAVE_EPOLL"checking for PCRE2 library ... not foundsudo apt updatesudo apt install libpcre2-dev무시해도 되는 내용checking for nobody group ... not foundchecking for kqueue ... not foundchecking for crypt() ... not foundchecking ..
2025.02.05 -
Nginx 요청에 응답하지 않고 drop하기
server { listen 80; server_name {도메인}; return 444;}
2025.02.04