I have a docker based apache httpd server. I need to install mod_pagespeed
into that.
The flavour I am using is debian based not alpine based for now – for some reasons.
Following is the list of commands required to install the module in debian/ubuntu dist – from the official site
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb
sudo dpkg -i mod-pagespeed-*.deb
sudo apt-get -f install
This is giving error
dpkg: dependency problems prevent configuration of mod-pagespeed-stable:
mod-pagespeed-stable depends on apache2; however:
Package apache2 is not installed.
This is obvious because there is no apache2
service installed, only httpd
command works.
Even the folder structure is different then regular debian/ubuntu installation.
I don’t find any .so
file anywhere, otherwise I can put it in some directory and do a LoadModule
.
I guess I need to do a custom build from source, is there any easy way?
2
Answers
Mostly @Michael's answer is correct, however for those who uses default docker's apache module (like me) following answer would suffice.
Because debian's apache installation is different than docker apache's installation. (And if you already have setup/customised all the configuration and cannot re-customise to be debian's structure)
I have built the pagespeed module from that answer and then copied the module to my installation.
Dockerfile
You may use the following
Dockerfile
as a base:Build the image and launch a container, you’ll get a response header similar to
X-Mod-Pagespeed: 1.13.35.2-0
.Hope this helps!