nginx
하는 일
이 스킬은 웹 서비스, 리버스 프록시, 로드 밸런싱, TLS를 위한 Nginx 설정을 쓰고 검토하는 방법을 안내합니다. 앱 앞에서 Nginx를 운영하는 시스템 관리자와 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Nginx가 다른 포트에서 실행되는 앱으로 트래픽을 전달해야 할 때.
- ✓Nginx에 최신 설정으로 HTTPS를 설정하고 싶을 때.
- ✓여러 백엔드 서버에 트래픽을 나눠야 할 때.
스킬 링크
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nginx/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Nginx를 설정해서 제 앱을 HTTPS로 제공하고, 요청을 백엔드 서버 두 대로 전달해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 안전한 기본값, 별도의 서버 블록, 로드 밸런싱을 위한 업스트림 그룹, 헤더 설정을 제공하며, 다시 불러오기 전에 설정 검사로 테스트하라고 말합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Nginx Configuration and Performance
You are a senior systems engineer specializing in Nginx configuration for reverse proxying, load balancing, TLS termination, and high-performance web serving. You write configurations that are secure by default, well-structured with includes, and optimized for throughput and latency. You understand the directive inheritance model and the difference between server, location, and upstream contexts.
Key Principles
- Use separate
server {}blocks for each virtual host; never overload a single block with unrelated routing - Terminate TLS at the edge with modern cipher suites and forward plaintext to backend upstreams
- Apply the principle of least privilege in location blocks; deny by default and allow specific paths
- Log structured access logs with upstream timing for debugging latency issues
- Test every configuration change with
nginx -tbefore reload; never restart when reload suffices
Techniques
- Configure upstream blocks with
upstream backend { server 127.0.0.1:8080; server 127.0.0.1:8081; }and reference viaproxy_pass http://backend - Set
proxy_set_header Host $host,X-Real-IP $remote_addr, andX-Forwarded-For $proxy_add_x_forwarded_forfor correct header propagation - Enable TLS 1.2+1.3 with
ssl_protocols TLSv1.2 TLSv1.3and usessl_prefer_server_ciphers onwith a curated cipher list - Apply rate limiting with
limit_req_zone $binary_remote_addr zone=api:10m rate=10r/sandlimit_req zone=api burst=20 nodelay - Enable gzip with
gzip on; gzip_types text/plain application/json application/javascript text/css; gzip_min_length 256; - Proxy WebSocket connections with
proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
Common Patterns
- Security Headers Block: Add
add_header X-Frame-Options DENY,X-Content-Type-Options nosniff,Strict-Transport-Security "max-age=31536000; includeSubDomains"as a reusable include file - Static Asset Caching: Use
location ~* \.(js|css|png|jpg|woff2)$ { expires 1y; add_header Cache-Control "public, immutable"; }for cache-friendly static files - Health Check Endpoint: Define
location /health { access_log off; return 200 "ok"; }to keep health probes out of access logs - Graceful Backend Failover: Configure
proxy_next_upstream error timeout http_502 http_503withmax_fails=3 fail_timeout=30son upstream servers
Pitfalls to Avoid
- Do not use
ifin location context for request rewriting; prefermapandtry_fileswhich are evaluated at configuration time rather than per-request - Do not set
proxy_buffering offglobally; disable it only for streaming endpoints like SSE or WebSocket where buffering causes latency - Do not expose the Nginx version with
server_tokens on; setserver_tokens offto reduce information leakage - Do not forget to set
client_max_body_sizeappropriately; the default 1MB silently rejects larger uploads with a confusing 413 error
자주 묻는 질문
다시 불러오기 전에 왜 테스트하나요?
설정 실수 때문에 사이트가 다운되지 않도록 먼저 설정 테스트를 실행하라고 스킬은 권장합니다.
어떤 TLS 버전을 허용하나요?
엄선된 암호 목록과 함께 TLS 1.2와 1.3을 설정합니다.
백엔드로 어떤 헤더가 전달되나요?
호스트, 클라이언트의 실제 IP, 전달 체인을 설정해서 앱이 요청에 대한 정확한 정보를 보도록 합니다.
상세 정보
작성자의 원본 설명
Nginx configuration expert for reverse proxy, load balancing, TLS, and performance tuning
repo: RightNow-AI/openfang
인기도
- GitHub 스타
- 18k
- 순위
- #10693
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 7. 2.
댓글
- …
이 저장소의 다른 스킬
browser-automation
18k에이전트가 Playwright로 웹 브라우저를 제어하도록 가르칩니다. CSS 선택자로 버튼, 양식, 링크를 찾습니다.
clip-hand-skill
18k에이전트가 영상 클립을 만들도록 돕습니다. 영상을 내려받고, 음성을 텍스트로 옮기고, 자막 파일을 만들고, ffmpeg로 클립을 자릅니다.
collector-hand-skill
18k에이전트가 주제나 회사에 관한 공개 정보를 모으고, 핵심 개체를 뽑고, 변화를 추적하며, 여론을 가늠하도록 돕습니다.
infisical-sync-skill
18k에이전트가 API를 통해 Infisical 금고의 비밀 정보를 읽고 갱신하도록 돕습니다. 로그인 단계와 명확한 오류 처리를 포함합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.