• Home
  • Install google X-Mod-Pagespeed on Centos 6

Install google X-Mod-Pagespeed on Centos 6

November 5, 2013 Ning 4 Comments

Step 1: Enabling Google’s mod_pagespeed Repository

Create a file called /etc/yum.repos.d/mod-pagespeed.repo with the help of your favourite editor and add the following lines of code to it based on your OS bit.
RHEL/CentOS/Fedora 32-Bit


RHEL/CentOS/Fedora 64-Bit


Step 2: Installing mod_pagespeed Module for Apache

We use Yum to install the mod_pagespeed on systems, issue below command.

# yum –enablerepo=mod-pagespeed install mod-pagespeed

Step 3: Configuring mod_pagespeed Module for Apache

Above command creates following directories and files.

/etc/cron.daily/mod-pagespeed : mod_pagespeed cron script for checking and installing latest updates.
/etc/httpd/conf.d/pagespeed.conf : The main configuration file for Apache.
/usr/lib/httpd/modules/mod_pagespeed.so : mod_pagespeed module for Apache.
/var/www/mod_pagespeed/cache : File caching direcotry for web sites.
/var/www/mod_pagespeed/files : File generate prefix for web sites.

Note : restart httpd service
Step 4: Verifying mod_pagespeed Module for Apache

To verify mod_pagespeed module, first you need to creat a file called phpinfo.php under root directory of Apache and add the following lines of code to it. For example (/var/www/html/phpinfo.php).

Once you created the above file, then restart the Apache service to take new changes. Now access the file phpinfo.php by navigating to your web browser like http://localhost/phpinfo.php. You will see “X-Mod-Pagespeed” section in the HTTP header, similar to below.
Verifying mod_pagespeed Module

Verifying mod_pagespeed Module


    September 20, 2014 REPLY

    Right now it seems like WordPress is the preferred blogging platform out there right
    now. (from what I’ve read) Is that what you’re using on your blog?

    September 28, 2014 REPLY

    Appreciation to my father who infoprmed me about this web site,
    this website is genuinely remarkable.

    October 22, 2014 REPLY

    Fabulous, what a web site it is! This blog presents
    useful data to us, keep it up.

    December 24, 2014 REPLY

    Good way of telling, and nice piece off writing to take information conccerning my presentation subject matter,
    which i am going to deliver in school.

leave a comment