본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #5631

reverse-proxy

하는 일

리버스 프록시는 인터넷 트래픽을 여러분의 서비스로 보내도록 돕습니다. 또한 보안 인증서(SSL)를 관리하고 누가 무엇에 접근하는지 통제해 서비스를 보호할 수도 있습니다.

사용하는 경우

  • ✓여러 서비스가 있고 하나의 주소로 접근하고 싶을 때.
  • ✓트래픽이 서비스에 도달하기 전에 SSL 인증서 같은 보안 계층을 추가할 때.
  • ✓서비스가 과부하되지 않도록 서비스가 받는 접근 횟수를 제어할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/reverse-proxy/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/reverse-proxy/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“'my-app.com' 웹사이트의 트래픽을 3000번 포트에서 실행 중인 서비스로 보내도록 리버스 프록시를 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

리버스 프록시는 여러분의 서비스 앞에 위치합니다. 누군가 여러분의 주소에 접속하면, 프록시가 요청을 어떤 서비스로 보낼지 결정합니다. 또한 보안 인증서를 처리하고 설치할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Reverse Proxy

Configure reverse proxies to route traffic, terminate TLS, enforce rate limits, and serve as the gateway between clients and backend services.

When to Use

  • Routing traffic from a public domain to one or more backend services.
  • Terminating TLS at the edge and forwarding plain HTTP to backends.
  • Adding rate limiting, CORS, security headers, and access control.
  • Consolidating multiple services under a single domain with path-based routing.
  • Handling WebSocket upgrades, gRPC proxying, or HTTP/2 passthrough.

Prerequisites

  • Backend service(s) running on known host:port.
  • TLS certificate (Let's Encrypt, ACM, or self-signed for development).
  • nginx 1.25+ or Traefik 3.x installed.
  • DNS record pointing the domain to the proxy server.

nginx Reverse Proxy

Basic HTTPS Proxy with Redirect

# /etc/nginx/sites-available/app.example.com
server {
    listen 80;
    server_name app.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name app.example.com;

    # TLS configuration
    ssl_certificate     /etc/letsencrypt/live/app.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;
    ssl_ciphers         ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers on;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;

    # Security headers
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
    add_header X-Frame-Options DENY always;
    add_header X-Content-Type-Options nosniff always;
    add_header Referrer-Policy strict-origin-when-cross-origin always;

    # Proxy to backend
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        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;

        # Timeouts
        proxy_connect_timeout 5s;
        proxy_read_timeout 60s;
        proxy_send_timeout 60s;

        # Buffering
        proxy_buffering on;
        proxy_buffer_size 4k;
        proxy_buffers 8 4k;
    }
}

Path-Based Routing to Multiple Services

server {
    listen 443 ssl http2;
    server_name app.example.com;

    ssl_certificate     /etc/letsencrypt/live/app.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;

    # Frontend SPA
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
    }

    # API backend
    location /api/ {
        proxy_pass http://127.0.0.1:8080/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_read_timeout 120s;
    }

    # WebSocket endpoint
    location /ws/ {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_read_timeout 86400s;  # 24h for long-lived connections
    }

    # Static assets with caching
    location /static/ {
        alias /var/www/static/;
        expires 30d;
        add_header Cache-Control "public, immutable";
    }
}

Rate Limiting

# Define rate limit zones in http block
http {
    # 10 requests/second per IP
    limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s;

    # 1 request/second for login
    limit_req_zone $binary_remote_addr zone=login_limit:10m rate=1r/s;

    # Connection limit per IP
    limit_conn_zone $binary_remote_addr zone=conn_limit:10m;
}

server {
    listen 443 ssl http2;
    server_name app.example.com;

    # Apply rate limit to API
    location /api/ {
        limit_req zone=api_limit burst=20 nodelay;
        limit_req_status 429;
        proxy_pass http://127.0.0.1:8080;
    }

    # Strict rate limit on auth endpoints
    location /api/auth/ {
        limit_req zone=login_limit burst=5;
        limit_req_status 429;
        proxy_pass http://127.0.0.1:8080;
    }

    # Connection limit
    location / {
        limit_conn conn_limit 100;
        proxy_pass http://127.0.0.1:3000;
    }
}

Gzip and Brotli Compression

http {
    gzip on;

…
자주 묻는 질문

SSL/TLS란 무엇인가요?

사용자와 서버 사이의 통신을 암호화해 주고받는 데이터가 안전하고 비공개로 유지되도록 하는 기술입니다. 리버스 프록시가 이를 관리합니다.

'트래픽 라우팅'은 무엇을 뜻하나요?

접속한 주소나 요청 유형 같은 규칙에 따라 들어오는 요청을 올바른 서비스로 보낸다는 뜻입니다.

Nginx나 Traefik을 설치해야 하나요?

네, 리버스 프록시가 작동하려면 서버에 Nginx나 Traefik 같은 소프트웨어가 설치되고 설정되어 있어야 합니다.

상세 정보

작성자의 원본 설명

Configure nginx and Traefik as reverse proxies. Implement SSL termination and routing. Use when setting up application gateways.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5631
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬