If you are here, that means that you tried to setup HTTP3/QUIC with nginx 1.25.3 on a reverse proxy but failed to do so.
The problem is with the establishment of http3 connection.
The issue was related to the configuration of Nginx, specifically in how it was set up to handle connections. Here’s a breakdown of the original and revised configurations:
- Original Configuration:
- IPv6 QUIC Protocol Configuration: The original configuration included a line
listen [::]:443 quic default_server reuseport;
. This directive instructed Nginx to listen for QUIC protocol connections on the IPv6 address[::]
(which is shorthand for all IPv6 addresses) at port 443. - Problem: The use of QUIC protocol with IPv6 was causing issues.
- IPv6 QUIC Protocol Configuration: The original configuration included a line
- Revised Configuration:
- IPv4 QUIC Protocol Configuration: The revised configuration changed the above line to
listen 443 quic default_server reuseport;
. This new directive instructs Nginx to listen for QUIC protocol connections on IPv4 addresses at port 443. - Result: This change resolved the issue, enabling the domain to work with HTTP/3.
- IPv4 QUIC Protocol Configuration: The revised configuration changed the above line to
- Verification:
- To verify the solution, a Docker command was used:
docker run --rm ymuski/curl-http3 curl -I -X GET --http3 'https://bgw-2.lp-playback.studio/'
. This command uses a Docker container to make an HTTP/3 request to the server. - Response: The response from the server, including headers like
HTTP/3 415
,server: nginx/1.25.3
, and various access control and cache control headers, confirmed that the server is now correctly handling HTTP/3 requests.
- To verify the solution, a Docker command was used:
In summary, the issue was resolved by altering the Nginx configuration to listen for QUIC protocol connections on IPv4 instead of IPv6, thereby enabling the domain to support HTTP/3.
If you need any help regarding this you can ask me directly in the comment section below.