• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

Install Mod_pagespeed Module With Apache on Ubuntu 16.04

How VPS by How VPS
January 1, 2020
in Linux
0
0
SHARES
14
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Introduction
  2. Prerequisites
  3. Step 1: Update the system
  4. Step 2: Install Mod_pagespeed
  5. Step 3: Configure the Mod_pagespeed module
  6. Step 4: Access Mod_pagespeed web interface
  7. Want to contribute?


Introduction

Mod_pagespeed is an open source Apache module that is used to automatically optimize web pages. It makes the web faster by rewriting web pages to reduce latency and bandwidth. Mod_pagespeed also provides many optimization filters that are used to optimize various files such as css, html, png, and jpg.

In this tutorial, I will explain how to install and configure the Mod_pagespeed module with Apache on Ubuntu 16.04.

Prerequisites

  • A newly deployed Vultr Ubuntu 16.04 server instance with Apache installed.
  • A non-root user with sudo privileges setup on your server.
  • A static IP address 192.168.15.110 configure on your system.

Step 1: Update the system

Before starting, update your system to the latest stable version by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot

Step 2: Install Mod_pagespeed

You can download the latest stable version of Mod_pagespeed module for Apache from it’s official website.
Otherwise you can download it with the following command:

wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb

Once download is complete, install it by running the following command:

sudo dpkg -i mod-pagespeed-stable_current_amd64.deb
sudo apt-get install -f

Once installation is finished, you will need to restart Apache service to load the module:

sudo systemctl restart apache2

You can verify the Mod_pagespeed module by running the following curl command:

curl -D- localhost

If everything was successful, you will see the following output:

HTTP/1.1 200 OK
Date: Mon, 28 Nov 2016 15:28:51 GMT
Server: Apache/2.4.7 (Ubuntu)
Accept-Ranges: bytes
Vary: Accept-Encoding
X-Mod-Pagespeed: 1.11.33.2-0
Cache-Control: max-age=0, no-cache
Content-Length: 10724
Content-Type: text/html; charset=UTF-8

Step 3: Configure the Mod_pagespeed module

You can configure Mod_pagespeed module different ways. Either you can use the default pagespeed.conf file to configure it for the whole server, or you can put your all of its settings in your virtual host directive.

Let’s start by editing the default pagespeed.conf file:

sudo nano  /etc/apache2/mods-available/pagespeed.conf

To disable Mod_pagespeed module change the line from on to off.

ModPagespeed off

Mod_pagespeed uses different types of levels that makes configuration simple such as PassThrough, CoreFilters, and OptimizeForBandwidth.
The default setting is:

ModPagespeedRewriteLevel CoreFilters

To disable CoreFilters change the lines to:

ModPagespeedRewriteLevel PassThrough

If you want to enable additional filters specify:

ModPagespeedEnableFilters filter1 filter2

To disable filter specify:

ModPagespeedDisableFilters filter1 filter2

Step 4: Access Mod_pagespeed web interface

Mod_pagespeed module provides a web based interface to view server state. You will need to add your remote machine’s IP address in pagespeed.conf file to access it from a remote machine.

sudo nano /etc/apache2/mods-available/pagespeed.conf

Change the file as shown below:

<Location /pagespeed_admin>
    Order allow,deny
    Allow from localhost
    Allow from 127.0.0.1
    Allow from remote-ip-address
    SetHandler pagespeed_admin
</Location>

<Location /pagespeed_global_admin>
    Order allow,deny
    Allow from localhost
    Allow from 127.0.0.1
    Allow from remote-ip-address
    SetHandler pagespeed_global_admin
</Location>

Save the file and restart the Apache service.

sudo systemctl restart apache2

Next, open your web browser and type the URL http://192.168.15.110/pagespeed_admin to access the Mod_pagespeed web interface.

Mod_pagespeed is now installed and configured on your server.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Invoice Ninja on Ubuntu 16.04

Next Post

Enabling SNI on DirectAdmin

Next Post

Enabling SNI on DirectAdmin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet