WIUNIX ACADEMY
Build Nginx with HTTP/3 and verify QUIC
Page 2 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
LET’S BUILD
Create the initial HTTP site
Save these contents with your real hostname. Replace only the generated configuration for this new lab installation; preserve a copy first if you have already customized it.
Start on TCP 80 so ACME can validate the hostname before TLS refers to certificate files. The dedicated web root will contain the demonstration and ACME challenge files.
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;
server {
listen 80;
server_name h3.example.com;
root /var/www/academy-quic;
location / { try_files $uri $uri/ =404; }
}
}The lab file contains the intended hostname and dedicated web root.
Open the service unit
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
sudo test ! -e /etc/systemd/system/academy-nginx-quic.service && sudo test ! -L /etc/systemd/system/academy-nginx-quic.service || exit 1
sudoedit /etc/systemd/system/academy-nginx-quic.serviceLET’S BUILD
Create a dedicated systemd unit
The dedicated unit uses one exact binary for validation, start, reload and stop. systemd owns the runtime PID directory. Its two reload commands run sequentially; failed validation prevents the next command.
The root master binds privileged ports and reads protected keys, while workers use academy-nginx. Never make private keys world-readable. This lab unit requires a separate production hardening review.
File contents · save in the editor
[Unit]
Description=WIUNIX Academy Nginx QUIC lab
After=network.target
[Service]
Type=forking
RuntimeDirectory=academy-nginx-quic
RuntimeDirectoryMode=0755
PIDFile=/run/academy-nginx-quic/nginx.pid
ExecStartPre=/opt/nginx-quic/sbin/nginx -t
ExecStart=/opt/nginx-quic/sbin/nginx
ExecReload=/opt/nginx-quic/sbin/nginx -t
ExecReload=/opt/nginx-quic/sbin/nginx -s reload
ExecStop=/opt/nginx-quic/sbin/nginx -s quit
TimeoutStopSec=30
[Install]
WantedBy=multi-user.targetThe named unit points only to this lab's binary and PID file.
LET’S BUILD
Start HTTP and check the network path
Reinspect all listeners before creating the new web root and starting the validated dedicated unit. Preserve other services; if required ports are owned, stop this exercise instead of stopping their owner.
On RPM, complete the preceding SELinux file/UDP policy steps first. Confirm actual worker account and, on enforcing RPM, httpd_t process confinement; service active alone proves no external request.
Server terminal · sudo where shown
set -eu
sudo ss -lntup
check_root_parent() {
local parent="$1" parent_uid parent_mode
test -d "$parent" && test ! -L "$parent" || { printf 'STOP: directory/link: %s\n' "$parent" >&2; exit 1; }
parent_uid=$(stat -c %u -- "$parent") || exit 1
parent_mode=$(stat -c %a -- "$parent") || exit 1
if [ "$parent_uid" != 0 ] || (( (8#$parent_mode & 0022) != 0 )); then
printf 'STOP: require root-owned non-writable parent: %s\n' "$parent" >&2; exit 1
fi
}
for parent in / /opt /var; do check_root_parent "$parent"; done
check_root_parent '/opt/nginx-quic'
if [ ! -e /var/www ] && [ ! -L /var/www ]; then sudo mkdir -m 755 /var/www; fi
check_root_parent /var/www
sudo mkdir -m 755 '/var/www/academy-quic'
printf '%s\n' 'WIUNIX Academy: QUIC lab' | sudo tee '/var/www/academy-quic/index.html'
sudo chmod 644 '/var/www/academy-quic/index.html'
sudo '/opt/nginx-quic/sbin/nginx' -t
sudo systemctl daemon-reload
sudo systemctl enable --now academy-nginx-quic
systemctl is-active academy-nginx-quic
ps -eo user,pid,ppid,args | grep '[n]ginx'The dedicated unit is active, workers use academy-nginx and the demo file is readable. On enforcing RPM verify httpd_t confinement. External HTTP is checked in the later client panel.
Inspect the active firewall
Identify the configured firewall owner on this Arch/Manjaro VM. Tool presence does not establish an active manager. The following rules apply only to existing active UFW; for nftables/firewalld use that owner’s procedure for the three specified transports, without enabling another manager.
Server terminal · inspection only
command -v ufw firewall-cmd nft || true
sudo ss -lntupAllow only the required web transports
Only add these rules if UFW is already active and the access is missing. Do not enable UFW blindly. Provider and NAT rules must also handle UDP separately.
Server terminal · existing active UFW only
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 443/udp