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.
# vim /etc/apache2/mods_available/pagespeed.conf
# 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
# service apache2 restart
# /etc/init.d/httpd restart