server { listen 8080; server_name _; root /usr/share/nginx/html; index index.html; charset utf-8; charset_types text/css application/javascript application/json; # 프록시(NPM) 뒤에 있으므로 실제 클라이언트 IP 로그 real_ip_header X-Forwarded-For; gzip on; gzip_min_length 1024; gzip_types text/plain text/css application/javascript application/json image/svg+xml; # 여러 페이지짜리 정적 사이트. 없는 경로는 index.html 로 되돌리지 말고 404 를 준다. # (되돌리면 /없는페이지.html 이 200 으로 셸을 내려주어 배포 사고를 못 알아챈다) location / { try_files $uri $uri/ =404; add_header Cache-Control "no-cache, must-revalidate"; } location = /healthz { access_log off; default_type text/plain; return 200 "ok\n"; } }