Error nginx: [emerg] invalid parameter "quic"
The error nginx: [emerg] invalid parameter "quic"
usually means that the Nginx version you're using does not have support for QUIC and HTTP/3, or that it's not compiled with the necessary modules and libraries.
Here’s a checklist to troubleshoot and resolve the issue:
1. Check Nginx Version
QUIC and HTTP/3 support were introduced starting with Nginx 1.25.0 (released in June 2023). Ensure your Nginx version is up-to-date.
To check your version:
If your version is older than 1.25.0, you'll need to upgrade.
2. Ensure Nginx is Built with QUIC Support
Nginx does not enable QUIC and HTTP/3 by default. It requires specific modules and libraries:
- OpenSSL 1.1.1 or later (or a compatible fork like BoringSSL).
- The Nginx binary must be compiled with the
--with-http_v3_module
option.
You can check your build configuration using:
Look for the --with-http_v3_module
option in the output. If it’s missing, you’ll need to compile Nginx manually with QUIC support.
3. Install Required Dependencies
To compile Nginx with QUIC:
- Install a supported version of OpenSSL or BoringSSL.
- Compile Nginx with the necessary flags:
4. Check Your Configuration
Ensure your nginx.conf
contains the proper directives to enable QUIC. A minimal QUIC configuration might look like this:
5. Restart Nginx
After updating the configuration, restart Nginx to apply the changes:
6. Verify QUIC Support
You can verify QUIC support using tools like:
- HTTP/3 Test
- Command-line tools like
curl
(with HTTP/3 support):