I recently needed to speed up the load time of one of my websites, while I didn't want to change the content itself I could change how fast it was delivered with mod_gzip. This tutorial features dynamic integration of mod_gzip with Apache, no recompile ne
How to install mod_gzip
I recently needed to speed up the load time of one of my websites, Ramprage.com - a popular sports website, while I didn't want to change the content itself I could change how fast it was delivered with mod_gzip. This tutorial features dynamic integration of mod_gzip with Apache, no recompile necessary.
mod_gzip is an Internet Content Acceleration module for the popular Apache Web Server. It compresses the contents delivered to the client. There is no need to install any additional software on the client!
Project website: http://sourceforge.net/projects/mod-gzip/
There is also static integration where gzip is compiled directly into the Apache binary but we do not feature that here.
Test Your Current Website for mod_gzip or compression
They should say not compressed, meaning you od not have mod_gzip turned on or installed.
Login to your server and su to root.
Download the file to a directory of your choice.
tar -zxvf mod_gzip-126.96.36.199a.tgz
Open the makefile to edit the path of Apache builder.
Save and exit the file, Ctrl+X then Y
Lets compile the module, this will NOT affect your current Apache binary.
Now the next command will place the files into your folders such as the .so and .c mod_gzip files and add two lines to your httpd.conf file, it will backup the config file first.
Lets take a look at the config file to see what happened and what we need to do.
Find the mod_gzip which was added: Remove comments # from
#LoadModule gzip_module libexec/mod_gzip.so
LoadModule gzip_module libexec/mod_gzip.so
Save and close the file, Ctrl+x then Y
Now everything should be good to go but we want to do a dry run of how Apache is going to handle this new addition.
This will do a test to Apache but won't restart the live server itself, isn't Apache smart like that eh!
It might spit our no VirtualDirective or error that some directories are missing, this is normal and fine.
Restart the Live Server to enabled mod_gzip
Test It Again, Now you should have compression enabled giving you faster load times.
Cheers from Canada!
About the Author:
Steven Leggett is the editor of the server resource and hosting tutorial site, www.webhostgear.com and specializes in system administration and web development.
WebHostGear.com is a hosting directory, not a web host.
Copyright © 1998-2015 WebHostGear.com