How to install mod_gzip step by step .

How to install mod_gzip step by step .

by Max Zúñiga -
Number of replies: 3
How to install mod_gzip
by
Steven Leggett , editor of the server resource and hosting tutorial site :www.webhostgear.com

Login to your server and su to root.
Download the file to a directory of your choice.

wget http://easynews.dl.sourceforge.net/sourceforge/mod-gzip/mod_gzip-1.3.26.1a.tgz

tar -zxvf mod_gzip-1.3.26.1a.tgz

cd mod_gzip-1.3.26.1a/

Open the makefile to edit the path of Apache builder.
pico Makefile

FIND:
APXS?=/usr/local/sbin/apxs

CHANGE TO:
APXS?=/usr/local/apache/bin/apxs

Save and exit the file, Ctrl+X then Y

Lets compile the module, this will NOT affect your current Apache binary.

make

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.

make install

Lets take a look at the config file to see what happened and what we need to do.

pico /usr/local/apache/conf/httpd.conf

Find the mod_gzip which was added: Remove comments # from

FIND:
#LoadModule gzip_module libexec/mod_gzip.so

CHANGE TO:
LoadModule gzip_module libexec/mod_gzip.so

FIND:
#AddModule mod_gzip.c
cd
CHANGE TO:
AddModule mod_gzip.c

Save and close the file, Ctrl+x then Y

Run Test
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!

/usr/local/apache/bin/apachectl configtest
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
/etc/init.d/httpd restart
.......
cheers from Canada
Average of ratings: -
In reply to Max Zúñiga

Re: How to install mod_gzip step by step .

by Max Zúñiga -
sorry forgot this last step:
Add the following to httpd.conf

# MOD_GZIP configuration
mod_gzip_on Yes
mod_gzip_minimum_file_size  1002
mod_gzip_maximum_file_size  0
mod_gzip_maximum_inmem_size 60000
mod_gzip_item_include mime "application/x-httpd-php"
mod_gzip_item_include mime text/*
mod_gzip_item_include mime "httpd/unix-directory"
mod_gzip_dechunk Yes
mod_gzip_temp_dir "/tmp"
mod_gzip_keep_workfiles No
mod_gzip_item_include file "\.php3$"
mod_gzip_item_include file "\.txt$"
mod_gzip_item_include file "\.html$"
mod_gzip_item_exclude file "\.css$"
mod_gzip_item_exclude file "\.js$
In reply to Max Zúñiga

Re: How to install mod_gzip step by step .

by Martín Langhoff -
Good stuff Max. Of course, that's good if you compiled Apache yourself in the first place. Those using the apache included in your linux distro can use the standard package...

For Debian and derivatives like Ubuntu, that looks like...

> apt-get install libapache-mod-gzip

In reply to Martín Langhoff

Re: How to install mod_gzip step by step .

by Max Zúñiga -
Yes,! Martin ( L. ) ,Sir !
You are right ,
thanks for your feedback.
max z.