• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Google/Apache PageSpeed With HTTPS, HTTP/2 (Apache2, Ubuntu 18.04)

By Abhishek Ghosh May 28, 2018 11:29 pm Updated on May 28, 2018

Google/Apache PageSpeed With HTTPS, HTTP/2 (Apache2, Ubuntu 18.04)

Advertisement

Unfortunately after Snowden Revelations, Google is not reliable about data privacy and data security. Google Approached to Move PageSpeed to Apache Incubator. However, Many Modules Do Use Google’s CDNs to serve the assets (which demands thorough knowledge to tweak to change). As still, CDN locations are not made to null URL by default, it will have precaution for the sites and site-owners who want highest privacy of the users. Here is Guide Install Google/Apache PageSpeed With HTTPS, HTTP/2 With Apache2 on Ubuntu 18.04. At present, Google/Apache PageSpeed works out of the box with HTTPS. Previously, we published guide on how to install Apache2 on Ubuntu 18.04 and configure for HSTS, HTTPS, HTTP/2 etc. Although, this guide is for Ubuntu 18.04, it does work on Ubuntu 16.04.

mod_http2 provides an HTTP2 variable which can be used to provide a different configuration for HTTP2 sessions to disable some filters in such sessions. Of course whether using PageSpeed with bleeding edge modules is practical that need testing on own production site. The module erratically does break basic padlock test. Also, if you are using a reverse proxy (like we have guide to use Nginx to add IPv6 with reverse proxy) in front that needs extra settings (we discussed in this guide). However, yet it may not respect directive and demands your random manual checking.

 

How To Install Google/Apache PageSpeed With HTTPS, HTTP/2 With Apache2

 

After installation, you’ll have a file named /etc/default/mod-pagespeed, with the below content :

Advertisement

---

Vim
1
2
repo_add_once="false"
repo_reenable_on_distupgrade="true"

If you do not want to use the Google repository, before installing the .deb package run:

Vim
1
touch /etc/default/mod-pagespeed

If you do not understand what it means, you can skip the above step and proceed:

Vim
1
2
3
4
apt update -y
apt upgrade -y
sudo reboot
# SSH back

You can download the latest, stable version of mod_pagespeed module for Apache from the official site :

Vim
1
https://www.modpagespeed.com/doc/download

At time of writing, that is :

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

Install with the below commands :

Vim
1
2
3
4
sudo dpkg -i mod-pagespeed-*.deb
sudo apt-get -f install
ls -al
rm mod-pagespeed-stable_current_amd64.deb

Google-Apache PageSpeed With HTTPS HTTP2 Apache2, Ubuntu 18-04

mod_pagespeed_ap24.so got activated, with pagespeed.conf, pagespeed_libraries.conf config files. Also a standalone JavaScript minifier pagespeed_js_minify got installed. To uninstall on need, you need to run simple :

Vim
1
2
Remove # before running it seriously
# sudo apt-get remove mod-pagespeed-stable

Now, go to /etc/apache2/sites-available/ and run an ls -al :

Vim
1
2
cd /etc/apache2/sites-available/
ls -al

There will be your virtual host config file for HTTPSS site. Within virtual host scope, add :

Vim
1
2
ModPagespeedFetchHttps enable
ModPagespeedRespectXForwardedProto on

Run configtest :

Vim
1
apachectl -t

More settings, including for HTTP/2, shown on official documentation :

Vim
1
https://www.modpagespeed.com/doc/https_support

And restart Apache :

Vim
1
sudo systemctl restart apache2

If you curl your website to fetch header, you’ll see Pagespeed header :

Vim
1
2
3
curl -I https://thecustomizewindows.com/ | grep X-Mod-Pagespeed
 
X-Mod-Pagespeed: 1.13.35.2-0

Open the configuration file :

Vim
1
nano /etc/apache2/mods-available/pagespeed.conf

At present, default settings enough good to test how good or bad it is. You need many changes for pagespeed_admin, one is (change your-ip-address to your current IP of internet connection) :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
Allow from your-ip-address
SetHandler pagespeed_admin
</Location>
 
<Location /pagespeed_global_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
Allow from your-ip-address
SetHandler pagespeed_global_admin
</Location>

Save and restart Apache :

Vim
1
2
apachectl -t
sudo systemctl restart apache2

You should see web admin http://your-ip-address/pagespeed_admin. You should read documentation :

Vim
1
https://www.modpagespeed.com/doc/

I informed you to manually check webpages randomly to find whether PageSpeed is breaking your SSL padlock.

Tagged With setup apache pagespeed https , apache pagespeed ubuntu 18 04 , mod pagespeed on ubuntu 18 04 , Módulo Pagespeed and http2 , ubuntu 18 04 minify
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Google/Apache PageSpeed With HTTPS, HTTP/2 (Apache2, Ubuntu 18.04)

  • How To Install Apache2 on Ubuntu 18.04 With Let’s Encrypt, HTTP/2, HSTS

    Here is Detailed Guide on How To Install Apache2 on Ubuntu 18.04 With Let’s Encrypt, HTTP/2, HSTS With Commands and Configurations For Most Secured Setup.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • How To Install mod_pagespeed on Rackspace Cloud Server

    Step by Step Guide on How To Install mod_pagespeed on Rackspace Cloud Server Running Ubuntu 13.10 plus Add On Tips to Configure Cloud Files.

  • Apache2 IPv6 Virtual Host Configuration (Ubuntu Server)

    Most Important Part of Apache Web Server is Virtual Host. Here is Apache2 IPv6 Virtual Host Configuration For Ubuntu Server.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy