Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Nginx Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-nginx-knowledge-patch-nevaberry-plugins)
---
name: nginx-knowledge-patch
description: NGINX
version: "1.31.10"
license: MIT
metadata:
author: Nevaberry
---
# NGINX compatibility guidance
Load this skill when configuring, upgrading, or troubleshooting NGINX,
NGINX Plus, or freenginx. Use the topic references for complete conditions,
configuration examples, security fix versions, and legacy migrations.
Product-specific guidance is labeled in the references.
## Reference index
| Reference | Topics |
| --- | --- |
| [Core HTTP and runtime](references/core-http-and-runtime.md) | Configuration migrations, request validation, routing, redirects, variables, filters, builds, workers, and Control API |
| [Upstreams and proxying](references/upstreams-and-proxying.md) | Keepalive, HTTP/2 backends, DNS, balancing, affinity, forwarding, trailers, and caching |
| [TLS, certificates, and QUIC](references/tls-certificates-and-quic.md) | Trust, OCSP, credential caches, ECH, compression, TLS variables, sessions, and QUIC |
| [Stream, mail, and protocols](references/stream-mail-and-protocols.md) | Stream listeners, PROXY protocol, ALPN, tunneling, mail, FastCGI, SCGI, uWSGI, and Memcached |
| [NGINX Plus operations](references/nginx-plus-operations.md) | Licensing, reporting, migrations, authentication, ACME, upstream policy, health checks, and metrics |
| [Security and upgrades](references/security-and-upgrades.md) | Vulnerability conditions, stable and mainline fix versions, historical upgrade floors, and patch verification |
## Breaking changes and deprecations
Use `./configure --without-http_upstream_sticky_module` to disable the HTTP
upstream sticky module. The previous `--without-http_upstream_sticky` option
is deprecated starting in 1.31.0.
Windows builds of 1.31.8 remove the `iocp` event module. If the `events` block
explicitly selects `iocp`, remove that selection to use the default event method.
In 1.31.7, replace zero sizes flagged in affected buffer-size directives during
configuration validation with positive values.
Starting in 1.31.9, an `initgroups()` failure is fatal during worker initialization.
Check supplementary group lookup for the configured worker account if workers
fail to start after upgrading.
Starting in 1.31.0, HTTP/2 and HTTP/3 requests containing `Connection`,
`Proxy-Connection`, `Keep-Alive`, `Transfer-Encoding`, or `Upgrade` are rejected.
`TE` is accepted only with the value `trailers`.
Starting in 1.29.4, chunked request and response bodies require CRLF terminators;
a bare LF is an error. Host and port syntax is validated against RFC 3986 in
the request line, `Host`, and `:authority`.
Starting in 1.29.7, upstreams default to `keepalive 32 local`, caching up to
32 idle connections per worker with reuse scoped to a location. HTTP proxying
defaults to HTTP/1.1 and omits the upstream `Connection` header.
Use `keepalive 32;` for reuse across locations with matching upstream addresses,
`keepalive 0;` to disable caching, or `proxy_set_header Connection ...;` when
the upstream needs an explicit header value.
Starting in 1.31.4, NGINX always sends `:authority` on HTTP/2 and gRPC backend
requests and `Host` on HTTP/1.1 backend requests. Incomplete gRPC responses with
nonzero `Content-Length` are treated as malformed.
## Security upgrade decisions
For `ssl_early_data`, upgrade to at least 1.30.8 on stable or 1.31.10 on mainline
to fix excessive CPU usage in CVE-2026-132779.
For `ngx_http_v3_module`, 1.30.5 on stable or 1.31.6 on mainline fixes
CVE-2026-90439.
Stable 1.30.7 and mainline 1.31.9 fix vulnerabilities in the resolver, HTTP/2,
HTTP/3, TLS 1.3 request-body reads, mail proxy, `alias` with `try_files`, stream
client-certificate validation, and stream `ssl_preread`. Mainline 1.31.9 also
fixes a PROXY protocol v2 vulnerability. The security reference maps each to
its CVE and preserves the mainline-only attribution for the PROXY protocol fix.
For regular expressions in `map`, upgrade to 1.31.3 on mainline or 1.30.4 on
stable for CVE-2026-42533. The 1.30.4 fix also covers string expressions using
a non-cacheable variable. CVE-2026-60005 in the slice filter is fixed in 1.31.3
and 1.30.4; the 1.30.4 fix also applies to background cache updates.
Use the security reference for separate rewrite, UTF-8 decoding, WebDAV, MP4,
mail, OCSP, backend-response, and historical security fixes. It gives the
corresponding mainline fix versions for fixes reported on stable branches.
Treat error-log fields as untrusted when displaying or parsing logs.
## Upstream discovery, balancing, and affinity
Since 1.27.3, standard builds can refresh upstream addresses with
`server ... resolve` in a shared-memory `zone`. Set `resolver` in the upstream
or enclosing `http` block. `resolver_timeout` defaults to 30 seconds.
```nginx
upstream app {
zone app 64k;
resolver 127.0.0.1;
resolver_timeout 5s;
server app.example.com:8080 resolve;
}
```
With `resolve` and a portless hostname, `service=http` queries
`_http._tcp.<hostname>`. Lowest-priority-value SRV records become primary peers;
the others become backups. Adding `backup` keeps only the lowest-priority-value
records as backup peers.
Since 1.29.6, standard builds support `sticky cookie`, `sticky route`, and
`sticky learn`. A `route` value supplies a stable server identifier; `drain`
limits a server to requests already bound to it.
`sticky learn` records a backend response cookie in a shared-memory zone and
looks up the session from the client's request cookie. Its optional `sync`
parameter requires the commercial edition.
Since 1.31.0, `least_time` balances HTTP upstream requests using backend response
times; `least_time header;` measures time to receive response headers.
## Proxy protocols, Early Hints, and trailers
Since 1.29.4, `proxy_http_version 2;` selects HTTP/2 for `proxy_pass` backends.
HTTP/2 proxying requires `ngx_http_v2_module` and defaults `:authority` to
`$proxy_host`; an explicit `Host` header overrides that default.
With `proxy_request_buffering off;`, an HTTP/2 backend can receive an HTTP/1.1
chunked client upload as it arrives. Failover is possible only before the proxy
starts sending the body. In 1.31.9, discarding the client request body makes the
HTTP proxy use `Content-Length: 0` on the upstream request.
Since 1.29.0, `early_hints` forwards HTTP 103 responses from proxy or gRPC
backends before the final response. 1.29.1 fixes cases where those responses
remained buffered on a client HTTP/2 connection.
Since 1.27.2, `proxy_pass_trailers on;` forwards proxied response trailers.
For an HTTP/1.1 backend, advertise trailer support:
```nginx
proxy_http_version 1.1;
proxy_set_header Connection te;
proxy_set_header TE trailers;
proxy_pass_trailers on;
```
Starting in 1.31.3, `proxy_buffer_size` caps headers and trailers from HTTP/2
proxy backends; `grpc_buffer_size` supplies the corresponding gRPC limit.
Adjust the applicable size when an upstream sends larger metadata.
## TLS credentials, trust, and QUIC
Since 1.27.4, `ssl_certificate_cache max=1000;` caches server certificates and
keys loaded through variables. The upstream counterparts are
`proxy_ssl_certificate_cache`, `grpc_ssl_certificate_cache`, and
`uwsgi_ssl_certificate_cache`. For the proxy TLS credential cache, `inactive` is the idle
eviction period and `valid` is the reuse period before reload or revalidation;
their defaults are `inactive=10s` and `valid=60s`.
Since 1.27.2, stream TLS servers support `ssl_ocsp on` for client certificate
revocation checks and `ssl_stapling on` for the server certificate's OCSP
response. Client OCSP validation needs client certificate verification;
configure a resolver for OCSP responder hostnames.
In HTTP and stream, `ssl_ocsp leaf;` restricts validation to the leaf certificate,
`ssl_ocsp_cache` defaults to `off`, and `ssl_ocsp_responder` accepts only
`http://` URLs.
To verify client certificates while keeping trusted CA names out of the
handshake, use `ssl_trusted_certificate` and omit `ssl_client_certificate`.
A server inherits `ssl_conf_command` settings only if it declares none of its
own; repeat enclosing commands that the server still needs when adding one.
TLS 1.3 certificate compression is opt-in with `ssl_certificate_compression on;`
since 1.29.1. OpenSSL builds require OpenSSL 3.2 or newer. Since 1.29.3, BoringSSL
is supported, and compression is disabled when OCSP stapling is active.
Since 1.29.4, `ssl_ech_file` configures ECH on builds with the OpenSSL ECH feature
branch. The TLS reference covers HTTP and stream ECH variables, TLS signature
variable availability, and library-specific behavior.
Since 1.29.1, OpenSSL 3.5.1 or newer supports QUIC 0-RTT;
`ssl_early_data on;` enables early data.
## Runtime and stream configuration
`keepalive_min_timeout` protects reusable client connections from early
server-side closure, including graceful worker shutdown. Since 1.27.4, it
defaults to `0` and is valid in `http`, `server`, and `location`.
Since 1.29.7, `listen ... multipath` enables Multipath TCP; adding or removing
the parameter also enables `SO_REUSEPORT` on the socket.
Since 1.31.4, stream and mail `proxy_protocol` support PROXY protocol v2 toward
upstreams. Since 1.31.0, stream `proxy_ssl_alpn` advertises an application
protocol to a TLS upstream. `ngx_http_tunnel_module` adds HTTP tunneling, and
`auth_basic`, `satisfy`, and `auth_delay` support proxy client authentication.
## NGINX Plus operations
Starting in R33, each Plus instance requires a JWT subscription license.
The initial usage report after a new installation or upgrade is required;
failure blocks traffic when the 180-day grace period is disabled.
Subsequent reports are sent hourly over TLS. Restricted networks can relay
reports through NGINX Instance Manager; R34 adds a reporting `proxy` in `mgmt`.
For tracing deployments upgrading to R34 or later, use
`nginx-plus-module-otel`; the OpenTracing dynamic module is unavailable there.
For MQTT buffers in R30, use `mqtt_buffers` in place of `mqtt_rewrite_buffer_size`.
The Plus reference includes native OIDC, ACME, variable-based access decisions,
dynamic upstream requests, API metrics, and earlier package/API migrations.
`proxy_allow_upstream` requires every argument to be nonempty and other than
`0`. Refusal counts toward `max_fails` even if `proxy_next_upstream` omits `denied`.
`health_check mandatory;` holds new peers out of rotation until they pass a
check. `health_check mandatory persistent;` retains healthy peer eligibility
across reloads, starting in R24 for HTTP and R25 for stream.
## Product-specific behavior
The references label freenginx guidance explicitly, including its response
rate limiting, minimum transfer rates, HTTP/0.9 handling, duplicate chunked
coding option, stale-cache behavior, mail traffic controls, and TLS features.
Commercial-edition features and NGINX Plus release conditions are also explicit.