Skip to content

/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

bash
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
nginx
# before (1.24)
listen 443 ssl http2;

# after (1.25.1+)
listen 443 ssl;
http2 on;

Notable changes

VersionChange
1.25.0HTTP/3 and QUIC support (ngx_http_v3_module, listen … quic)
1.25.1http2 directive; the http2 parameter of listen is deprecated
1.26stable branch with the 1.25 features
1.27.3resolve parameter of server in upstream blocks in the open-source build (periodic DNS re-resolution)
1.28, 1.30later stable branches

Upgrade checklist

  1. Run nginx -t with the new binary and fix every [warn].
  2. Replace listen … http2 with http2 on; in each server block.
  3. For HTTP/3, add listen 443 quic reuseport; next to the TCP listen, open UDP 443 in the firewall, and send add_header Alt-Svc 'h3=":443"; ma=86400';.
  4. Check that third-party modules are rebuilt for the new version; dynamic modules must match the exact nginx version.

Sources