NGINX-MOD: The Faster NGINX Build
You Should Be Running
Stock NGINX leaves performance on the table. NGINX-MOD adds HTTP/3, full HPACK, dynamic TLS records, kernel TLS, and active health checks — as a drop-in replacement.
HTTP/2 Header Compression: The Difference Is Massive
Stock NGINX uses basic HPACK. NGINX-MOD implements full HPACK encoding from Cloudflare's patch, compressing headers 2.5x better.
Verify it yourself: h2load https://yoursite.com -n 2 | tail -6 | head -1
Everything Stock NGINX Is Missing
NGINX-MOD patches in the performance and security features that upstream NGINX doesn't include
HTTP/3 & QUIC
Full HTTP/3 with QUIC protocol support. Faster connection establishment, zero round-trip resumption, and improved performance on lossy networks.
Full HPACK Encoding
Cloudflare's HPACK patch delivers 78%+ HTTP/2 header compression vs ~30% in stock NGINX. Less bandwidth, faster page loads.
Dynamic TLS Records
Intelligent TLS record sizing reduces latency on initial page loads while maintaining throughput for large transfers.
Kernel TLS (kTLS)
Offload TLS encryption to the Linux kernel for significantly reduced CPU usage and higher throughput on RHEL 9+ and Fedora.
Active Health Checks
Proactively monitor upstream servers with 6 check types. Automatically remove unhealthy backends and restore them when recovered — no NGINX Plus required.
Extended Rate Limiting
Rate limit by hour, day, week, month, or year. Stock NGINX only supports per-second and per-minute rates.
Full Server Identity Hiding
Use server_tokens none; to completely remove NGINX from the Server: header and error pages. Stock NGINX cannot do this.
CONNECT Method Support
Tunnel SSL/TLS requests through NGINX as a forward proxy. Essential for corporate proxy and VPN use cases.
Dynamic Upstream API
Add, remove, and modify upstream servers at runtime through a REST API — no reload required. NGINX Plus-compatible, built-in.
NGINX-MOD vs Stock NGINX
A clear comparison of what NGINX-MOD adds to the table
| Feature | Stock NGINX | NGINX-MOD |
|---|---|---|
| HTTP/3 (QUIC) | ||
| HTTP/2 Full HPACK (~78% savings) | ||
| Dynamic TLS Record Sizing | ||
| Kernel TLS (kTLS) | ||
| Active Health Checks | ||
| Rate Limiting (hour/day/week/year) | ||
| server_tokens none; | ||
| CONNECT Method Proxy | ||
| Dynamic Upstream API (no reload) | ||
| TLS 1.3 (Latest OpenSSL) | partial | |
| Compatible with 100+ Modules | N/A | |
| Drop-in Config Replacement | — |
Upgrade Your NGINX in 60 Seconds
NGINX-MOD is included in the Pro tier alongside 100+ dynamic modules and 10+ exclusive Pro modules.
Subscribe to GetPageSpeedInstall NGINX-MOD
No compilation, no hassle. Works with your existing configuration.
On RHEL, AlmaLinux, Rocky, Oracle Linux, Amazon Linux, Fedora, or SLES
Install the Repository
Add the GetPageSpeed repository and enable NGINX-MOD.
sudo yum -y install \
https://extras.getpagespeed.com/release-latest.rpm
# Enable NGINX-MOD
sudo yum-config-manager \
--enable getpagespeed-extras-nginx-mod
Install NGINX-MOD
Install the enhanced build along with any modules you need.
sudo yum -y install nginx \
nginx-module-brotli \
nginx-module-pagespeed
Start & Verify
Enable NGINX and verify HPACK compression is working.
sudo systemctl enable --now nginx
# Verify HPACK
h2load https://yoursite.com -n 2
On EL8+, dnf can be used in place of yum.
If yum-config-manager is not found, install it: sudo yum -y install yum-utils
On Ubuntu 22.04 / 24.04 or Debian 12
Add the Keyring & APT Source
Trust the GetPageSpeed signing key and add the nginx-mod APT suite for your codename.
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://extras.getpagespeed.com/deb-archive-keyring.gpg \
| sudo tee /etc/apt/keyrings/getpagespeed.gpg >/dev/null
# Replace ${distro} with ubuntu or debian,
# ${codename} with jammy / noble / bookworm
sudo tee /etc/apt/sources.list.d/getpagespeed-extras.list <<EOF
deb [signed-by=/etc/apt/keyrings/getpagespeed.gpg] https://extras.getpagespeed.com/${distro} ${codename}-nginx-mod main
deb [signed-by=/etc/apt/keyrings/getpagespeed.gpg] https://extras.getpagespeed.com/${distro} ${codename} main
EOF
Install NGINX-MOD
Installing nginx-mod automatically swaps out any existing nginx package (it declares Conflicts: nginx).
sudo apt-get update
sudo apt-get install nginx-mod
# Optional: install dynamic modules
# from the stable suite (ABI-compatible)
sudo apt-get install \
nginx-module-brotli \
nginx-module-geoip2
Start & Verify
Enable NGINX and verify HPACK compression is working.
sudo systemctl enable --now nginx
# Verify HPACK (apt install nghttp2)
h2load https://yoursite.com -n 2
Launch matrix: Ubuntu 22.04 (jammy), Ubuntu 24.04 (noble), Debian 12 (bookworm). Both amd64 and arm64.
Recommended: pin GetPageSpeed packages with /etc/apt/preferences.d/getpagespeed-nginx.pref at priority 1001 — see the APT setup docs.
Switching To & From NGINX-MOD
NGINX-MOD is a drop-in replacement. Switch in either direction without losing your configuration or modules.
Switch to NGINX-MOD RHEL family
Already running stable or mainline NGINX from GetPageSpeed? Switch without losing your configuration or modules:
sudo yum-config-manager \
--disable getpagespeed-extras-mainline
sudo yum-config-manager \
--enable getpagespeed-extras-nginx-mod
# Swap to NGINX-MOD in place
# (modules are kept automatically)
sudo yum -y swap nginx nginx-mod
# Re-enable the service
sudo systemctl enable --now nginx
Switch Back to Stable NGINX RHEL family
Revert to the standard stable NGINX package while preserving your existing configuration:
sudo yum-config-manager \
--disable getpagespeed-extras-nginx-mod
sudo yum-config-manager \
--disable getpagespeed-extras-mainline
# Remove nginx-mod from RPM DB only
sudo rpm --erase --justdb \
--nodeps nginx-mod
# Install stable NGINX
sudo yum -y install nginx
sudo yum history sync
# Re-enable the service
sudo systemctl enable --now nginx
Switch to NGINX-MOD Ubuntu / Debian
Add the nginx-mod APT suite alongside the stable suite. Installing nginx-mod auto-swaps the stable nginx package via APT's Conflicts resolution:
sudo tee /etc/apt/sources.list.d/getpagespeed-extras.list <<EOF
deb [signed-by=/etc/apt/keyrings/getpagespeed.gpg] https://extras.getpagespeed.com/${distro} ${codename}-nginx-mod main
deb [signed-by=/etc/apt/keyrings/getpagespeed.gpg] https://extras.getpagespeed.com/${distro} ${codename} main
EOF
# Swap in NGINX-MOD
sudo apt-get update
sudo apt-get install nginx-mod
# Re-enable the service
sudo systemctl enable --now nginx
Switch Back to Stable NGINX Ubuntu / Debian
Drop the nginx-mod suite line and reinstall stable nginx in a single APT transaction (the trailing - after nginx-mod removes it):
sudo sed -i '/-nginx-mod main/d' \
/etc/apt/sources.list.d/getpagespeed-extras.list
sudo apt-get update
# Remove nginx-mod + install stable nginx
sudo apt-get install nginx nginx-mod-
# Re-enable the service
sudo systemctl enable --now nginx
On EL8+, dnf can be used in place of yum.
If yum-config-manager is not found, install it: sudo yum -y install yum-utils
NGINX-MOD: Frequently Asked Questions
Everything you need to know about the faster NGINX build
yum install nginx-module-* commands. No recompilation needed. yum swap nginx nginx-mod, then systemctl enable --now nginx. This works whether you are on stable or mainline NGINX. Your config files remain untouched. Stop Leaving Performance on the Table
NGINX-MOD is the NGINX build your servers deserve. Get it today with a GetPageSpeed subscription and unlock 100+ dynamic modules.
Subscribe Now — Pro from $20/mo