http3_hq

Enables HTTP/3 support in NGINX.

Syntaxhttp3_hq on | off;
Defaultoff
Contexthttp, server
Argumentsflag

Description

The http3_hq directive is a configuration option within NGINX that enables or disables support for HTTP/3, which is the third major version of the Hypertext Transfer Protocol. This directive can be placed in either the http or server context, allowing for configuration at both the global and specific server levels. When enabled, NGINX will listen for QUIC connections, which HTTP/3 utilizes as its transport layer, and will handle requests over this protocol.

Using this directive can significantly improve response times and allow for better handling of packet loss, as HTTP/3 is built on QUIC which provides features such as multiplexing and connection migration. When the http3_hq directive is set to on, NGINX will process HTTP/3 requests accordingly, while setting it to off will revert to traditional HTTP/1.1 or HTTP/2 protocols for serving web content. It's essential to ensure that server certificates match the required specifications as QUIC and HTTP/3 are typically used in conjunction with HTTPS.

Administrative awareness is vital since enabling HTTP/3 may require specific additional configurations, such as the use of UDP for QUIC traffic and relevant firewall rules to avoid blocking HTTP/3 requests.

Config Example

server {
    listen 443 ssl http3;
    http3_hq on;
    ssl_certificate /etc/ssl/certs/example.com.crt;
    ssl_certificate_key /etc/ssl/private/example.com.key;
}

Ensure that your system supports QUIC and UDP; otherwise, HTTP/3 cannot function properly.

Firewalls may need adjustments to allow UDP traffic which is crucial for HTTP/3.

Certificates must be appropriately set to work with QUIC; an invalid certificate will cause failures in establishing HTTP/3 connections.

← Back to all directives