=encoding utf-8 =head1 Name quic - Support for QUIC and HTTP/3 =head1 Support for L and L3|https://datatracker.ietf.org/doc/html/rfc9114> protocols is available since 1.25.0. Also, since 1.25.0, the QUIC and HTTPE3 support is available in Linux L. B The QUIC and HTTPE3 support is experimental, caveat emptor applies. =head1 Building from sources The build is configured using the C command. Please refer to L for details. When configuring nginx, it is possible to enable QUIC and HTTPE3 using the L|configure> configuration parameter. An SSL library that provides QUIC support is recommended to build nginx, such as L, L, or L. Otherwise, the L compatibility layer will be used that does not support L. Use the following command to configure nginx with L: ./configure --with-debug --with-http_v3_module --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto" Alternatively, nginx can be configured with L: ./configure --with-debug --with-http_v3_module --with-cc-opt="-I../quictls/build/include" --with-ld-opt="-L../quictls/build/lib" Alternatively, nginx can be configured with a modern version of L: ./configure --with-debug --with-http_v3_module --with-cc-opt="-I../libressl/build/include" --with-ld-opt="-L../libressl/build/lib" After configuration, nginx is compiled and installed using C. =head1 Configuration The L directive in L module got a new parameter L which enables HTTPE3 over QUIC on the specified port. Along with the C parameter it is also possible to specify the L parameter to make it work properly with multiple workers. For the list of directives, see L. To L address validation: quic_retry on; To L 0-RTT: ssl_early_data on; To L GSO (Generic Segmentation Offloading): quic_gso on; To L host key for various tokens: quic_host_key ; QUIC requires TLSv1.3 protocol version which is enabled by default in the L directive. By default, L is disabled. Enable it in case a corresponding network interface is configured to support GSO. =head1 Example Configuration http { log_format quic '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent" "$http3"'; access_log logs/access.log quic; server { # for better compatibility it's recommended # to use the same port for quic and https listen 8443 quic reuseport; listen 8443 ssl; ssl_certificate certs/example.com.crt; ssl_certificate_key certs/example.com.key; location / { # required for browsers to direct them to quic port add_header Alt-Svc 'h3=":8443"; ma=86400'; } } } =head1 Troubleshooting Tips that may help to identify problems: =over =item * Ensure nginx is built with the proper SSL library. =item * Ensure nginx is using the proper SSL library in runtime (the C shows what it is currently used). =item * Ensure a client is actually sending requests over QUIC. It is recommended to start with a simple console client such as L to ensure the server is configured properly before trying with real browsers that may be quite picky with certificates. =item * Build nginx with L and check the debug log. It should contain all details about the connection and why it failed. All related messages contain the “C” prefix and can be easily filtered out. =item * For a deeper investigation, additional debugging can be enabled using the following macros: C, C, C, C. ./configure --with-http_v3_module --with-debug --with-cc-opt="-DNGX_QUIC_DEBUG_PACKETS -DNGX_QUIC_DEBUG_CRYPTO" =back