1. Home
  2. Help Articles
  3. Turn Google pagespeed ON/OFF on Apache server

Turn Google pagespeed ON/OFF on Apache server


Google Pagespeed is a family of tools by Google which is designed to help a website’s performance optimizations. This article will briefly explain how to turn pagespeed ON or OFF by editing the the Apache configuration file.


Prior to editing the pagespeed configuration, you should have the following setup on your server.

  • Linux OS(CentOS/Ubuntu/Debian/Fedora) with Apache web server installed over it.
  • User account on server with sudo privileges.
  • mod_pagespeed package must be installed on your server.

You can learn how to install mod-pagespeed package with apache on Ubuntu/CentOS server by clicking here.

Step 1: Login to your server with root access

Step 2: Access the apache server configuration file using any editor. We will be using vim editor for this article.

In Ubuntu:

# vim /etc/apache2/mods_available/pagespeed.conf

In CentOS:

# vim /etc/httpd/conf.d/pagespeed.conf

Step 3: Identify the line starting with ModPagespeed and edit it to  ModPagespeed On (to enable) and ModPagespeed Off (to disable) page speed for your domain. Then save the changes and exit the configuration file.

Step 4: Post this please restart apache web server service using command

In Ubuntu:

# service apache2 restart

In CentOS:

# /etc/init.d/httpd restart
Updated on February 3, 2017

Was this article helpful?

Related Articles

Add A Comment