benqzq
By:
benqzq

Installing mod_deflate. I already published in AskUbuntu; I invite anyone to answer

December 4, 2016 130 views
Apache Ubuntu 16.04

http://askubuntu.com/questions/856930/what-is-the-most-basic-way-to-install-mod-deflate-in-apache-2-4-on-an-ubuntu-16

Moderator Edit: The linked question has been added below for reference.


I want to emphasis the first part of my heading The most basic way because when I searched a way for how to install this module on Apache 2.4, I found about 8 different articles, almost all with slightly different installation instructions. While reading, these questions rose up to me (I want to emphasis the last 2, which in some look, are integral part of this very question):

Should I uncomment 1 or 2 or 3 directives in apache2.conf?
Should I add one or 2 PCRE code blocks after uncommenting?
Which of these ways can contribute most performance from the (Gzip) compression?
Is it even possible to determine these without being an Apache-PCRE expert?
I believe an answer to the last two would be the most global and appropriate, and could help newcomers like me to handle better with this, especially in uptight times.

Some of the documentation I've checked:

The official documentation doesn't remind uncommenting LoadModule in apache2.conf while some external articles do, see for example answer by Karim79, as well as this article, and this one in DO.
1 Answer

On the question about whether un-commenting LoadModule is required I think this is mainly a difference in the scope of the documentation. The official documentation is focused on configuring the module regardless of the underlying OS. The other tutorials are focused on installation and initial setup in a particular environment. When building apache from source you would usually compile the modules you plan to use at the same time but when setting up your software on a modern Linux distribution you will usually be installing things using that system's package manager which packages some modules separately. In general, once a new module is installed on for example an Ubuntu server you can enable the module with the a2enmod command which takes care of most of the work for you.

As far as the best practices for your other questions, unless you get other advice I would recommend going with the simplest option and take additional steps if you run into trouble. If someone with more knowledge on the best way to optimize your mod_deflate configuration hopefully they will provide more insight here or on your AskUbuntu post.

Have another answer? Share your knowledge.