I have installed Apache 2.4 on the Red Hat Enterprise Linux Server release 6.7 (Santiago) by following these steps


cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo


yum install httpd24.x86_64

and Apache is installed at the following location


I am now trying to install mod_pagespeed on my Apache installation by following these command

cd /etc/yum.repos.d/
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
rpm -U mod-pagespeed-*.rpm

but while running rpm -U mod-pagespeed-*.rpm, I am getting following error

warning: mod-pagespeed-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
    httpd >= 2.2 is needed by mod-pagespeed-stable-

I am aware that I have not used the standard way of installing Apache on the machine, but is there a way to install mod_pagespeed without remove current Apache installation?

Other option for me is to install Apache from RHEL standard repo and not using Apache2.4

  • You can probably get past RPM with --nodeps but then you'll still likely need to move filed around manually
    – Jeff Schaller
    Nov 14, 2015 at 22:09
  • The answers below are for centos7/rhel 7 but the question is about rhel 6, and non e of the answers given actually work in the configuration the requester required. Dec 2, 2019 at 21:30

4 Answers 4


Here is a proper guide on how to install most recent version of mod_pagespeed module for Apache or Nginx on RHEL/CentOS and Debian/Ubuntu-based systems..


Key points:

On RHEL/CentOS and Fedora

----------- On 32-bit Systems -----------------
# wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm
# yum install at   [# if you don't already have 'at' installed]
# rpm -Uvh mod-pagespeed-stable_current_i386.rpm

----------- On 64-bit Systems -----------------
# wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
# yum install at   [# if you don't already have 'at' installed]
# rpm -Uvh mod-pagespeed-stable_current_x86_64.rpm

On Debian and Ubuntu

----------- On 32-bit Systems -----------------
$ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb
$ sudo dpkg -i mod-pagespeed-stable_current_i386.deb
$ sudo apt-get -f install

----------- On 64-bit Systems -----------------
$ wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
$ sudo dpkg -i mod-pagespeed-stable_current_amd64.deb
$ sudo apt-get -f install
  • Links can rot; it would be helpful to summarise the relevant parts of the resource here so that this actually answers the question itself. Oct 15, 2016 at 6:02

This worked for me on CentOS Linux release 7.5.1804 (Core), with Apache/2.4.6 and PHP/5.6.38.

First lets edit/create google-mod-pagespeed.repo

vi /etc/yum.repos.d/google-mod-pagespeed.repo

Then lets add


Now lets use yum to install it

yum install mod-pagespeed

Last, but not the least, lets restart apache

service httpd restart

To test you can use

curl -D- http://localhost/ | head -10

And lets hope you get something like in the result...


  • This repo didn't work for me, but maybe that was because didn't do yum install at first. The curl command is a good way to test, though, so +1 for that. Note that you can use curl -D- http://www.servername.com/ | head -10 to fetch your live website, if you are testing a particular virtual host. Nov 8, 2019 at 15:25

A 2.2 Apache module in an Apache 2.4 installation won't work.

I recommend you follow the instructions from here.



I know this is old, but I found this resource which may explain the issue. (https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/zI2reYRfqYA) I ran into this too, I think because my Apache installation is managed by EasyApache in cpanel. Therefore, the httpd files aren't where pagespeed expects them to be. The answer given in the link is that the easiest thing to do is to build pagespeed from source.

Instructions can be found here: https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .