WIUNIX ACADEMY
Build Nginx with HTTP/3 and verify QUIC
Page 3 of 5. Review the earlier steps and prerequisites before continuing.
YOUR SYSTEM. YOUR STEPS.
Where are you working?
Choose your OS and version. The prerequisites, commands and troubleshooting follow your environment.
USE YOUR OWN VALUES
Configure this tutorial
Set the example values for your environment; related explanations and copy panels update together. Never enter passwords, private keys or tokens. Values stay in this tab and are not sent to the server or share links. Check actual DNS, certificates and network policy before running commands.
Different IP addresses, domains or ports? Open the settings below, change the values and select “Apply to tutorial”, then copy the updated commands.
Set values for my environment3 editable values
Check HTTP from another network
Replace the example hostname and run this on a device on another network. The demo must respond before certificate issuance; local access alone does not prove ACME reachability.
Authorized client on a different network; not the server VM
curl --noproxy '*' --fail --show-error --connect-timeout 5 --max-time 15 'http://h3.example.com/'WIUNIX Academy: QUIC lab
LET’S BUILD
Obtain a trusted certificate with webroot validation
Use the same controlled hostname for cert-name and domain. Webroot writes challenges into the existing TCP80 site without editing the custom Nginx configuration. Review account/email/agreement prompts.
Require a new lineage: stop for any existing or dangling-link live directory, archive directory or renewal configuration with this name. Confirm Certbot’s final paths before TLS, keep keys protected and save HTTP configuration under an unused backup name only after issuance succeeds.
Server terminal · sudo where shown
set -eu
for lineage_path in '/etc/letsencrypt/live/h3.example.com' '/etc/letsencrypt/archive/h3.example.com' '/etc/letsencrypt/renewal/h3.example.com.conf'; do
if sudo test -e "$lineage_path" || sudo test -L "$lineage_path"; then printf 'STOP: existing certificate state: %s\n' "$lineage_path" >&2; exit 1; fi
done
sudo certbot certonly --webroot -w '/var/www/academy-quic' --cert-name 'h3.example.com' -d 'h3.example.com'
sudo certbot certificates --cert-name 'h3.example.com'
sudo test ! -e '/opt/nginx-quic/conf/nginx.conf.http-before' && sudo test ! -L '/opt/nginx-quic/conf/nginx.conf.http-before' || exit 1
sudo cp -a '/opt/nginx-quic/conf/nginx.conf' '/opt/nginx-quic/conf/nginx.conf.http-before'Certbot reports a trusted, unexpired certificate for the hostname, and the working HTTP configuration is saved.
Open the TLS and QUIC configuration
Open the editor with this command. The next section contains the file contents; substitute the required hostname and paths before saving.
Server terminal · opens the editor
sudoedit /opt/nginx-quic/conf/nginx.confLET’S BUILD
Configure HTTPS over TCP and QUIC over UDP
Replace the lab nginx.conf with this complete file, substituting every hostname and certificate path. The HTTP challenge location remains reachable while other HTTP requests redirect to the fixed hostname.
The TCP TLS listener and UDP QUIC listener share port 443. TLS 1.2 remains available to TCP clients; QUIC negotiates TLS 1.3. reuseport appears once for this UDP address/port. Additional virtual hosts need consistent shared listener options.
Alt-Svc advertises h3 with a short 300-second cache for rollout. It announces availability but cannot prove UDP works. The transport log helps correlate actual requests. Keep 0-RTT off until application replay behavior has been assessed separately.
File contents · save in the editor
user academy-nginx;
worker_processes auto;
pid /run/academy-nginx-quic/nginx.pid;
error_log /opt/nginx-quic/logs/error.log warn;
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
log_format transport '$remote_addr [$time_local] "$request" $status protocol=$server_protocol h3=$http3';
access_log /opt/nginx-quic/logs/access.log transport;
server {
listen 80;
server_name h3.example.com;
root /var/www/academy-quic;
location ^~ /.well-known/acme-challenge/ { try_files $uri =404; }
location / { return 308 https://h3.example.com$request_uri; }
}
server {
listen 443 ssl;
listen 443 quic reuseport;
http2 on;
http3 on;
server_name h3.example.com;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate /etc/letsencrypt/live/h3.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/h3.example.com/privkey.pem;
ssl_early_data off;
add_header Alt-Svc 'h3=":443"; ma=300' always;
root /var/www/academy-quic;
location / { try_files $uri $uri/ =404; }
}
}The file has both transports, real certificate paths and the short h3 advertisement, with no placeholder hostname.
LET’S BUILD
Validate and inspect both listeners
Reload only after configuration validation succeeds. The TCP and UDP inspections are separate because a TCP socket listing cannot show QUIC. Inspect service and Nginx errors at their respective sources.
Resolve certificate-read, unknown-directive and address-in-use errors. An active service and open sockets are local checks; a strict external HTTP/3 request is still required.
Server terminal · sudo where shown
sudo restorecon -RFv '/etc/letsencrypt/live/h3.example.com' '/etc/letsencrypt/archive/h3.example.com'
sudo /opt/nginx-quic/sbin/nginx -t && sudo systemctl reload academy-nginx-quic
systemctl is-active academy-nginx-quic
sudo ss -lntp 'sport = :443'
sudo ss -lnup 'sport = :443'
sudo tail -n 20 /opt/nginx-quic/logs/error.lognginx: configuration file /opt/nginx-quic/conf/nginx.conf test is successful
activeValidation succeeds, the unit remains active and the intended Nginx process owns TCP and UDP 443.
LET’S BUILD
Prove HTTP/3 without silent TCP fallback
On a separate client, inspect curl’s features with the first command; HTTP3 must be listed. If absent, use an HTTP/3-capable build following the official guide or a capable browser’s protocol column.
Check trusted TCP HTTPS, then the HTTP/3-only request. The second request cannot silently fall back to HTTP/2 or HTTP/1.1. Keep certificate verification enabled. The output is illustrative rather than an observed test on every listed OS.
A CDN response may prove only the edge. The following panels separate origin-log inspection from an optional direct-origin request.
Authorized client on a different network; not the server VM
curl -V
curl --noproxy '*' --http1.1 --fail --show-error --connect-timeout 5 --max-time 15 -I 'https://h3.example.com/'
curl --noproxy '*' --http3-only --fail --show-error --connect-timeout 5 --max-time 15 -w '\nHTTP version: %{http_version}\n' 'https://h3.example.com/'WIUNIX Academy: QUIC lab
HTTP version: 3The strict request succeeds, returns the demo and prints HTTP version: 3; the origin logs h3=h3. HTTP/2 alone, Alt-Svc or a padlock does not meet this result.