i18n/de/skills/configure-reverse-proxy/SKILL.md
Konfiguriere Reverse-Proxy-Muster mit verschiedenen Tools einschliesslich Nginx, Traefik und ShinyProxy. Umfasst WebSocket-Proxying, pfadbasiertes und hostbasiertes Routing, SSL-Terminierung und Docker-Label-Auto-Discovery. Verwende diesen Skill beim Routing mehrerer Dienste hinter einem einzigen Einstiegspunkt, beim Proxying von WebSocket-Verbindungen (Shiny, Socket.IO), bei Auto-Discovery von Docker-Diensten mit Traefik-Labels oder beim Hinzufuegen von SSL-Terminierung zu Diensten, die TLS nicht nativ unterstuetzen.
npx skillsauth add pjt222/agent-almanac configure-reverse-proxyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reverse-Proxy-Muster fuer das Routing von Traffic zu Backend-Diensten mit Nginx, Traefik oder ShinyProxy einrichten.
| Funktion | Nginx | Traefik | |----------|-------|---------| | Konfiguration | Statische Dateien | Docker-Labels / dynamisch | | Auto-Discovery | Nein (manuell) | Ja (Docker-Provider) | | Let's Encrypt | Ueber certbot | Eingebautes ACME | | Dashboard | Nein (Drittanbieter) | Eingebaut | | WebSocket | Manuelle Konfiguration | Automatisch | | Geeignet fuer | Statische Konfiguration, hoher Traffic | Dynamische Docker-Umgebungen |
server {
listen 80;
location /api/ {
proxy_pass http://api:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /app/ {
proxy_pass http://webapp:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
}
Hinweis: Ein abschliessender / bei proxy_pass entfernt das Location-Praefix. proxy_pass http://api:8000/; mit location /api/ leitet /api/users als /users weiter.
server {
listen 80;
server_name api.example.com;
location / {
proxy_pass http://api:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://webapp:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
WebSockets erfordern Upgrade-Header. Wesentlich fuer Shiny, Socket.IO und Live Reload:
location /ws/ {
proxy_pass http://app:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}
Speziell fuer Shiny-Apps:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
location / {
proxy_pass http://shiny:3838;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_read_timeout 86400;
proxy_buffering off;
}
}
Erwartet: WebSocket-Verbindungen werden aufgebaut und bestehen fort.
Bei Fehler: Pruefen, ob proxy_http_version 1.1 gesetzt ist. Upgrade- und Connection-Header ueberpruefen.
docker-compose.yml:
services:
traefik:
image: traefik:v3.2
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "[email protected]"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt:/letsencrypt
api:
image: myapi:latest
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`api.example.com`)"
- "traefik.http.routers.api.entrypoints=websecure"
- "traefik.http.routers.api.tls.certresolver=letsencrypt"
- "traefik.http.services.api.loadbalancer.server.port=8000"
webapp:
image: myapp:latest
labels:
- "traefik.enable=true"
- "traefik.http.routers.webapp.rule=Host(`app.example.com`)"
- "traefik.http.routers.webapp.entrypoints=websecure"
- "traefik.http.routers.webapp.tls.certresolver=letsencrypt"
- "traefik.http.services.webapp.loadbalancer.server.port=3000"
volumes:
letsencrypt:
Erwartet: Traefik entdeckt Dienste automatisch ueber Labels und stellt SSL-Zertifikate bereit.
services:
api:
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`example.com`) && PathPrefix(`/api`)"
- "traefik.http.routers.api.middlewares=strip-api"
- "traefik.http.middlewares.strip-api.stripprefix.prefixes=/api"
- "traefik.http.services.api.loadbalancer.server.port=8000"
labels:
- "traefik.http.middlewares.ratelimit.ratelimit.average=100"
- "traefik.http.middlewares.ratelimit.ratelimit.burst=50"
- "traefik.http.middlewares.security.headers.stsSeconds=63072000"
- "traefik.http.middlewares.security.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.security.headers.frameDeny=true"
- "traefik.http.routers.app.middlewares=ratelimit,security"
# Nginx: Konfiguration testen
docker compose exec nginx nginx -t
# Routing pruefen
curl -H "Host: api.example.com" http://localhost/health
# WebSocket pruefen (benoetigt wscat: npm install -g wscat)
wscat -c ws://localhost/ws/
# Traefik-Dashboard (falls aktiviert)
# http://localhost:8080/dashboard/
Erwartet: Anfragen werden an die richtigen Backends geroutet. WebSocket-Upgrades sind erfolgreich.
Host-, X-Real-IP-, X-Forwarded-For-Headerdocker compose restartproxy_pass http://app/ vs http://app verhaelt sich bei Pfad-Stripping in Nginx unterschiedlich.proxy_read_timeout ist 60s. Langlebige WebSocket-Verbindungen benoetigen 86400 (24h)./var/run/docker.sock in Traefik gibt vollen Docker-Zugriff. ro-Mount verwenden und Socket-Proxy in Betracht ziehen.resolver 127.0.0.11 fuer Dockers internen DNS bei dynamischen Diensten verwenden.proxy_buffering off: Shiny- und SSE-Endpunkte benoetigen proxy_buffering off fuer Echtzeit-Streaming.configure-nginx - Detaillierte Nginx-Konfiguration mit SSL und Sicherheitsheaderndeploy-shinyproxy - ShinyProxy fuer containerisiertes Shiny-App-Hostingsetup-compose-stack - Compose-Stack mit Reverse Proxyconfigure-api-gateway - API-Gateway-Muster mit Kong und Traefiktesting
Launch all available agents in parallel waves for open-ended hypothesis generation on problems where the correct domain is unknown. Use when facing a cross-domain problem with no clear starting point, when single-agent approaches have stalled, or when diverse perspectives are more valuable than deep expertise. Produces a ranked hypothesis set with convergence analysis and adversarial refinement.
tools
Write integration tests for a Node.js CLI application using the built-in node:test module. Covers the exec helper pattern, output assertions, filesystem state verification, cleanup hooks, JSON output parsing, error case testing, and state restoration after destructive tests. Use when adding tests to an existing CLI, testing a new command, verifying adapter behavior across frameworks, or setting up CI for a CLI tool.
development
Screen a proposed trademark for conflicts and distinctiveness before filing. Covers trademark database searches (TMview, WIPO Global Brand Database, USPTO TESS), distinctiveness analysis using the Abercrombie spectrum, likelihood of confusion assessment using DuPont factors and EUIPO relative grounds, common law rights evaluation, and goods/services overlap analysis. Produces a conflict report with a risk matrix. Use before adopting a new brand name, logo, or slogan — distinct from patent prior art search, which uses different databases, legal frameworks, and analysis methods.
tools
Scaffold a new CLI command using Commander.js with options, action handler, three output modes (human-readable, quiet, JSON), and optional ceremony variant. Covers command naming, option design, shared context patterns, error handling, and integration testing. Use when adding a command to an existing Commander.js CLI, designing a new CLI tool from scratch, or standardizing command structure across a multi-command CLI.