How to install nginx-module-phpguard on AlmaLinux, Rocky Linux, Oracle Linux and RHEL

Shield unpatched PHP from php2shell multipart attacks

License: Proprietary Vendor: GetPageSpeed LLC https://nginx-extras.getpagespeed.com/modules/phpguard/

Availability

Compare package tracks by distribution and architecture. Checkmarks show the architectures available in each repository channel.

Distro Channel aarch64 x86_64 Version
RHEL 10 Stable — 1.31.8+1.0.0
NGINX mainline 1.31.8+1.0.0
RHEL 9 Stable — 1.31.8+1.0.0
NGINX mainline 1.31.8+1.0.0
RHEL 8 Stable — 1.31.8+1.0.0
NGINX mainline 1.31.8+1.0.0
RHEL 7 Stable — 1.31.8+1.0.0
NGINX mainline 1.31.8+1.0.0

Description

Virtual patch for php2shell (CVE-2026-109618, CVE-2026-109619 and CVE-2026-115560) that keeps legacy PHP running unchanged behind NGINX. The module reads every multipart/form-data body before PHP sees a byte and checks it with a streaming parser that mirrors PHP's own rfc1867 parser (verified on PHP 5.6 through 8.5, PHP-FPM or Apache mod_php behind proxy_pass). Key Features: - Refuses the session upload progress field, the confirmed php2shell trigger, in every spelling PHP accepts - Accepts only canonical multipart, so no part can be smuggled past it: preambles, epilogues, LF-only lines, NUL delimiters, ambiguous quoting and the part PHP finds after 5120 bytes when skipping an upload are all refused - Bounds PHP's parse memory with a cost model measured on PHP 5.6 to 8.5, closing the out-of-memory path of CVE-2026-109618 - Works with HTTP/1.1, chunked and HTTP/2, and with request buffering off - detect mode, a `$phpguard` reason variable for logs, ~3 GiB/s parsing; non-multipart requests are not inspected Verified against PHP's own session state on PHP 5.6, 7.4, 8.1, 8.4 and 8.5: 2,644 attack variants that reach PHP's upload progress code without the module reach it 0 times through it. A virtual patch is not a fix: upgrade PHP when you can. Premium module by GetPageSpeed. To enable this module after installation, add the following to /etc/nginx/nginx.conf and reload NGINX: load_module modules/ngx_http_phpguard_module.so; Alternatively, enable all installed modules by adding this line to the top of /etc/nginx/nginx.conf: include /usr/share/nginx/modules/*.conf;

Built for AlmaLinux, Rocky Linux, Oracle Linux and RHEL.

Install

Stable RHEL 7, 8, 9, 10

nginx-module-phpguard on AlmaLinux / Rocky Linux / Oracle Linux / RHEL 8, 9, 10

sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm
sudo dnf -y install nginx-module-phpguard

nginx-module-phpguard on CentOS 7 / RHEL 7

sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install nginx-module-phpguard
NGINX mainline RHEL 7, 8, 9, 10

nginx-module-phpguard on AlmaLinux / Rocky Linux / Oracle Linux / RHEL 8, 9, 10

sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --enable getpagespeed-extras-mainline
sudo dnf -y install nginx-module-phpguard

nginx-module-phpguard on CentOS 7 / RHEL 7

sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable getpagespeed-extras-mainline
sudo yum -y install nginx-module-phpguard

Package downloads require an active GetPageSpeed subscription — one repository for nginx-module-phpguard and thousands more packages for AlmaLinux, Rocky Linux, Oracle Linux and RHEL.

Subscribe — from $10/mo

Frequently asked questions

How do I install nginx-module-phpguard on AlmaLinux, Rocky Linux, Oracle Linux and RHEL?

Add the GetPageSpeed repository, then install the nginx-module-phpguard package with your system package manager.

Which Enterprise Linux versions is nginx-module-phpguard available for?

nginx-module-phpguard is available for RHEL 7, 8, 9, 10.

Subscribe