Command Palette

Search for a command to run...

Назад к скиллам
скилл № 51787

Nginx

Configures and debugs nginx: reverse proxy, load balancing, SSL/TLS termination, caching, redirects, and static file serving. Use when writing or reviewing…

БесплатноБез исполняемых скриптов
clawicот clawic★ 23 звезды на GitHub

Установить Nginx в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

User preferences and memory live in ~/Clawic/data/nginx/ (see setup.md on first use, memory-template.md for the file format). If you have data at an old location (~/nginx/ or ~/clawic/nginx/), move it to ~/Clawic/data/nginx/, and say in one line that you moved it and from where.

Configuration

User-dependent variables. Defaults apply until the user states a preference; store them in ~/Clawic/data/nginx/config.yaml.

Variable Type Default Effect
os_family debian | rhel | alpine debian Selects package/config layout (sites-enabled vs conf.d), makes SELinux the first 502/403 suspect on rhel (debug.md), and sets module install paths
deployment systemd | docker | kubernetes systemd Selects reload commands and resolver address; docker/kubernetes routes advice through containers.md
edge_position standalone | behind-cdn-lb standalone behind-cdn-lb turns on realip guidance, switches redirect logic from $scheme to X-Forwarded-Proto, and flags rate-limit keying on the LB address

Preference areas to record as the user reveals them:

  • tooling — OSS vs Plus, mainline vs stable channel, dynamic modules in use (brotli, headers-more, njs); governs which directives are assumed available
  • conventions — config layout (conf.d vs sites-enabled vs single file), snippet/include organization, upstream and zone naming; governs where examples place directives
  • safety posture — 302-before-301 rollout ramp, HSTS ramp speed, confirm-before-reload on production hosts; governs pacing in redirects.md and ssl.md
  • platform — IPv6 listeners, HTTP/2/3 adoption, which CDN/LB sits in front; governs listen directives and header-trust guidance

When To Use

  • Writing or reviewing nginx config: server blocks, locations, proxy_pass, upstreams
  • Debugging 502/504/413/403/redirect loops behind an nginx reverse proxy
  • SSL/TLS termination, HTTP/2, WebSocket, gRPC, or SSE through nginx
  • Tuning: workers, buffers, gzip, proxy cache, rate limiting
  • Proxying raw TCP/UDP (databases, TLS passthrough, syslog) and operating nginx (upgrades, monitoring, log rotation)
  • Not for certificate issuance/renewal itself (ACME, Let's Encrypt) — nginx consumes certs; issuance is the ssl skill

Quick Reference

Situation Play
Random 502 after a container/backend redeploy DNS cached at startup — use variable in proxy_pass + resolver (proxy.md)
502 immediately vs 504 after ~60s 502 = refused/reset/bad response; 504 = timeout. Different fixes (proxy.md)
413 on uploads client_max_body_size — default is 1m; raise in http or the exact server/location
WebSocket connects then dies, or never upgrades Upgrade trio + timeout (proxy.md)
SSE/streaming arrives all at once proxy_buffering off for that location (proxy.md)
gRPC calls fail through nginx, direct works grpc_pass, not proxy_pass — trailers and HTTP/2 (proxy.md)
Wrong file served / 403 on aliased path root vs alias semantics and the alias-traversal slash bug (semantics.md)
Request hits wrong location block Re-derive with the matching algorithm below; nginx -T to see effective config
Backend receives wrong path (/api/api/... or missing prefix) proxy_pass trailing-slash rules (below)
Browser cert warning, curl works Missing intermediates — serve fullchain (ssl.md)
80→443 redirect loop behind a CDN/LB Trust X-Forwarded-Proto, don't redirect on $scheme alone (ssl.md)
Redirect fixed in config but browser still loops Cached 301 — test in curl or a private window (redirects.md)
PHP blank page, "File not found", or browser downloads .php source SCRIPT_FILENAME and location order (fastcgi.md)
nginx container exits instantly, or template renders empty values Foreground mode and the envsubst collision (containers.md)
Proxy a database / route TLS by SNI without terminating / forward syslog stream {} block, ssl_preread (stream.md)
Upgrade the nginx binary or a module without dropping connections USR2/WINCH signal sequence (operations.md)
"Is nginx overloaded?" / capacity monitoring stub_status and what its numbers mean (operations.md)
Slow under load, high CPU or connection errors performance.md
Security headers vanished on some routes add_header inheritance trap (semantics.md)
Config behaves unlike it reads (if, variables, includes, root/alias) semantics.md
Anything else Debugging Order below, then the closest file above

Depth on demand: debug.md startup failures, status-code decoder, tracing · proxy.md 502/504, DNS trap, WebSocket, gRPC, buffering, retries · semantics.md root/alias, inheritance, if, variables, includes, server selection · redirects.md return/rewrite, status codes, canonical host · ssl.md chain, baseline, HSTS, OCSP, mTLS, HTTP/3 · performance.md workers, buffers,

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • _meta.json
  • containers.md
  • debug.md
  • fastcgi.md
  • memory-template.md
  • operations.md
  • performance.md
  • proxy.md
  • redirects.md
  • security.md
  • semantics.md
  • setup.md
  • ssl.md
  • stream.md

FAQ

Что делает скилл Nginx?

Configures and debugs nginx: reverse proxy, load balancing, SSL/TLS termination, caching, redirects, and static file serving. Use when writing or reviewing nginx.conf, server blocks, locations, upstreams, or proxy_pass, when a site behind nginx throws 502, 504, 413, 403, or a redirect loop, when WebSockets, SSE, or gRPC break through the proxy, when a certificate works in curl but warns in browsers, when requests hit the wrong location or the backend sees the wrong path, when tuning workers, buffers, gzip, or proxy cache, when rate limiting or blocking abuse, when proxying raw TCP/UDP, or when nginx runs in Docker or Kubernetes. Not for certificate issuance or renewal (ACME, Let's Encrypt) — that is the ssl skill.

Как установить скилл Nginx?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Nginx запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Nginx с