• 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

This Article Has Been Shared 905 Times!

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)

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

  • Create Data Science Environment on Cloud Server With Docker

    Here Are the Steps, Commands to Create Data Science Environment on Cloud Server For Data Analysis Starting With a Blank Server With SSH.

  • How to Install and Set Up LXD on Ubuntu 16.04

    Here is How to Install and Set Up LXD on Ubuntu 16.04. LXD Works With a Directory Based Storage Backend. LXD is lxc with strong security.

  • HP Will Not Sell Cheap Cloud Servers To Amazon Like Companies

    Hewlett Packard Enterprise Will Not Sell Cheap Cloud Servers To Amazon Like Companies Who Order Building Servers at China To Save Dual Loss.

  • How To Run Docker, Containers On IBM Bluemix

    On How To Run Docker, Containers On IBM Bluemix Guide We Have Provided Clear Instructions, Commands to Setup the Command Line Tools on Mac.

Additionally, 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

  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Google/Apache PageSpeed With HTTPS, HTTP/2 (Apache2, Ubuntu 18.04)," in The Customize Windows, May 28, 2018, February 3, 2023, https://thecustomizewindows.com/2018/05/pagespeed-with-https-http-2-apache2-ubuntu-18-04/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT