Skip to main content
mod_pagespeed 2.1 is here — open source (Apache-2.0): the module you know, plus the optimizer worker

ModPageSpeed for nginx

Install the native mod_pagespeed 2.1 module for Apache and nginx from the signed packages.modpagespeed.com repository, or run the Docker / nginx reverse proxy.

On this page

mod_pagespeed ships a native module for Apache and nginx. You have three working options:

Native Apache module

The signed repository at packages.modpagespeed.com ships the Apache module (mod-pagespeed) — the same channel mod_pagespeed 1.15 uses — for Apache 2.4+:

curl -fsSL https://packages.modpagespeed.com/install.sh | sudo sh
sudo apt-get install mod-pagespeed   # Debian/Ubuntu
sudo dnf install mod-pagespeed       # AlmaLinux/RHEL/Rocky

The module keeps the same directive surface and filter names, so an existing mod_pagespeed configuration carries over unchanged — see the configuration reference for the full directive set.

Running Apache under cPanel/WHM? Use the signed EasyApache 4 RPM instead — see the cPanel / EasyApache 4 guide. See Install from packages.modpagespeed.com for the full distribution matrix (including the yum packages) and the nginx module.

Native nginx module

The signed repository at packages.modpagespeed.com ships the nginx module (nginx-module-pagespeed) — the same channel mod_pagespeed 1.15 uses — for Debian and Ubuntu on amd64 and arm64. Each build is pinned to that distribution’s stock nginx (1.18 through 1.26), so there is no version to match by hand:

curl -fsSL https://packages.modpagespeed.com/install.sh | sudo sh
sudo apt-get install nginx-module-pagespeed

See Install from packages.modpagespeed.com for the full distribution matrix (including the yum packages) and the Apache module. The signed packages also sidestep the ngx_pagespeed build failures on modern nginx that come from compiling the old module from source.

Docker / nginx reverse proxy

The Docker / nginx reverse proxy runs the same optimization core in front of any HTTP origin. It uses a dynamic nginx module (ngx_pagespeed_module.so) paired with a separate worker process, and runs the same pipeline the native module does: image transcoding, CSS/JS minification, critical CSS, and zero-copy serving from the Cyclone shared-memory cache.

Run your site through a PageSpeed Insights test to see which failing audits ModPageSpeed will fix, and read the Core Web Vitals guide for the LCP, CLS, and INP plan.

Frequently asked questions

Is there a native nginx module for mod_pagespeed 2.1?

Yes. The native Apache and nginx module ships from the signed packages.modpagespeed.com repository — the same channel mod_pagespeed 1.15 uses.

How do I run mod_pagespeed on nginx today?

Two options. Install the native nginx module — a dynamic module from the signed packages.modpagespeed.com repository, built for Debian and Ubuntu on amd64 and arm64 and pinned to each distribution stock nginx (1.18 to 1.26). Or put the Docker / nginx reverse proxy in front of your origin.