Hosted reference docs
This is the canonical directive + filter reference for
nginx-module-pagespeed from GetPageSpeed. Pages are a faithful
Markdown copy of the original Apache mod_pagespeed documentation
(Apache License 2.0) — preserved here because the original
modpagespeed.com domain is now operated by an unrelated
commercial vendor whose product is a separate proprietary rewrite.
PageSpeed Module for NGINX
Install
nginx-module-pagespeed ships as a binary subscription package from
GetPageSpeed. Source builds are not supported.
CentOS / RHEL / Rocky / Alma / Fedora / Amazon Linux (RPM)
Stable channel (production, current PSOL-based 1.14.36.x build — x86_64 only, EL7-baseline through EL10/Fedora/amzn2/amzn2023):
dnf install -y https://extras.getpagespeed.com/release-latest.rpm
dnf install -y nginx-module-pagespeed
Then load the module in /etc/nginx/nginx.conf:
load_module modules/ngx_pagespeed.so;
Testing channel — upcoming v2 (ngx_pagespeed 2.x monorepo)
The v2 build (currently 2.1.0~beta<N>) bundles a modern libpagespeed,
supports x86_64 + aarch64, and requires EL9+ (glibc 2.39 SDK floor).
It ships in an opt-in testing sub-channel so stable users never
auto-upgrade to a beta.
dnf install -y https://extras.getpagespeed.com/release-latest.rpm
dnf config-manager --set-enabled getpagespeed-extras-testing
dnf install -y nginx-module-pagespeed
Debian / Ubuntu (APT)
# Configure the GetPageSpeed APT repo (see apt-nginx-extras docs), then:
sudo apt-get install nginx-module-pagespeed
The v2 beta is RPM-only at the moment; a DEB v2 beta is planned.
What it does
ngx_pagespeed automatically applies web performance best practices — image optimization (including WebP / AVIF in v2), CSS/JS minification, cache-extension, lazy-load, critical-CSS inlining, and 50+ more filters — without changes to your site.
Configure
Start with Module configuration. Common follow-on references: