/changelogs/nginx/nginx-1-24-to-1-30
nginx 1.24 to 1.30: the http2 directive, HTTP/3 and other changes
verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · nginx version: nginx/1.30.6updated 2026-10-20
- tool
- nginx
- versions
- 1.24 → 1.30
Between the 1.24 stable branch and 1.30, nginx gained HTTP/3 and a new way to enable HTTP/2. Existing configurations keep working, but nginx -t now warns about the old listen … http2 syntax.
listen … http2 is deprecated
mkdir -p logs temp
openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 1 -subj "/CN=localhost" 2>/dev/null
check() {
cat > nginx.conf <<EOF
pid logs/nginx.pid;
events {}
http { server { $1 ssl_certificate cert.pem; ssl_certificate_key key.pem; } }
EOF
nginx -p . -c nginx.conf -e stderr -t 2>&1 | sed -E 's/^[0-9/]+ [0-9:]+ \[([a-z]+)\] [0-9#]+: /[\1] /'
}
nginx -v 2>&1
echo "--- old syntax"; check 'listen 127.0.0.1:8443 ssl http2;'
echo "--- new syntax"; check 'listen 127.0.0.1:8443 ssl; http2 on;'Output
nginx version: nginx/1.30.6 --- old syntax [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in ./nginx.conf:3 nginx: the configuration file ./nginx.conf syntax is ok nginx: configuration file ./nginx.conf test is successful --- new syntax nginx: the configuration file ./nginx.conf syntax is ok nginx: configuration file ./nginx.conf test is successful
# before (1.24)
listen 443 ssl http2;
# after (1.25.1+)
listen 443 ssl;
http2 on;Notable changes
| Version | Change |
|---|---|
| 1.25.0 | HTTP/3 and QUIC support (ngx_http_v3_module, listen … quic) |
| 1.25.1 | http2 directive; the http2 parameter of listen is deprecated |
| 1.26 | stable branch with the 1.25 features |
| 1.27.3 | resolve parameter of server in upstream blocks in the open-source build (periodic DNS re-resolution) |
| 1.28, 1.30 | later stable branches |
Upgrade checklist
- Run
nginx -twith the new binary and fix every[warn]. - Replace
listen … http2withhttp2 on;in each server block. - For HTTP/3, add
listen 443 quic reuseport;next to the TCPlisten, open UDP 443 in the firewall, and sendadd_header Alt-Svc 'h3=":443"; ma=86400';. - Check that third-party modules are rebuilt for the new version; dynamic modules must match the exact nginx version.
Sources
Related pages
compat · nginxnginx stable vs mainline: version numbers and which branch to runnginx ships two branches: mainline (odd minor version, new features and all fixes) and stable (even minor, critical fixes only). How the numbering works.cheat sheets · nginxnginx cheat sheet: commands, server blocks, locations and proxyingnginx cheat sheet: test and reload, logs, server blocks, location matching order, reverse proxy headers, HTTPS redirects, static files and caching headers.commands · nginxnginx -t: test the configuration before reloadingnginx -t checks the configuration syntax and the files it references without touching the running server; nginx -T also prints the full merged config.