ngx_pagespeed

Install ngx_pagespeed on RHEL

Install the maintained PageSpeed module for nginx on Red Hat Enterprise Linux (RHEL) from a signed repository. The module is free to install and evaluate; a license is required for production optimization.

Install from the signed repository

Add the We-Amp signed dnf repository, then install the module with dnf. The bootstrap script detects RHEL and writes the source configuration; the packages are signed with the We-Amp repository key. Supported: RHEL 9 and binary-compatible rebuilds (CentOS Stream 9, Oracle Linux 9) on x86_64.

# Add the signed repository
curl -fsSL https://packages.modpagespeed.com/install.sh | sudo sh

# Install the nginx module
sudo dnf install nginx-module-pagespeed

After installing, load the module, add a minimal pagespeed configuration, and reload nginx. The configuration reference covers the directives you need to get optimization running.

Verify it is running

Once nginx is reloaded with the module enabled, an optimized response carries the X-Page-Speed header:

curl -sI https://yoursite/ | grep -i x-page-speed

A version string in that header means the worker is optimizing. If the header is absent, check that the module is loaded and pagespeed on; is set — the configuration reference walks through it.

Other RHEL versions and architectures

The signed RPM covers RHEL 9 and binary-compatible rebuilds (CentOS Stream 9, Oracle Linux 9) on x86_64. For arm64 (aarch64), or for EL8 / EL10, build the module from source against your nginx — the walkthrough covers it.

Build ngx_pagespeed from source

1.1 nginx or 2.0 nginx?

Two maintained engines exist for nginx. mod_pagespeed 1.1 keeps the existing pagespeed_* directives, so current configs carry over. ModPageSpeed 2.0 is a new architecture (mmap serving, variant-aware caching, AVIF) for fresh installs.

Compare mod_pagespeed 1.1 vs 2.0 for nginx

Licensing

The module is free to install and evaluate — it fully optimizes and adds an X-PageSpeed-Warn: unlicensed header until a license is applied. A commercial license is required for production use; your site keeps serving either way.