Skip to content
Back to skills

Nginx Config

ASecurity

Configure Nginx reverse proxies, upstream keepalives, TLS termination, timeouts, headers, and rate limits safely

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
developmentnodeapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill nginx-config --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nginx Config?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nginx Config
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-nginx-config-anvil/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-nginx-config-anvil)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nginx-config
description: Configure Nginx reverse proxies, upstream keepalives, TLS termination, timeouts, headers, and rate limits safely
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# Nginx config

Use when editing Nginx server blocks, upstreams, or edge proxy configurations.

## Upstreams and timeouts
- Set explicit `proxy_connect_timeout`, `proxy_send_timeout`, and `proxy_read_timeout`; use `keepalive 32;` on `upstream` blocks paired with `proxy_http_version 1.1;` and `proxy_set_header Connection "";`.
- Always forward client context accurately: `Host`, `X-Real-IP`, `X-Forwarded-For`, and `X-Forwarded-Proto`.
- Bound uploads cleanly with `client_max_body_size` per location instead of loosening limits globally.

## Security and caching
- Include `add_header ... always;` when adding `Strict-Transport-Security`, `X-Content-Type-Options: nosniff`, and CSP (noting Nginx drops parent-level `add_header` inside blocks that declare any `add_header`).
- Disable `server_tokens off;` and never put `alias` inside a location lacking matching trailing slashes to avoid path traversal.
- Place `limit_req_zone` and `limit_req ... nodelay` on login and expensive API routes.

## Verify
Run `nginx -t` after every edit, reload with `nginx -s reload`, and test proxy headers and error codes via `curl -I`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.