This guide will show you how to install mod_gzip on your Linux server

mod_gzip – what’s that, anyway?

mod_gzip – serving compressed content by the Apache webserver
mod_gzip is an external extension module for the WWW’s most popular web server Apache, created in autumn, 2000.
Its implementation allows for using the compression method gzip for a significant reduction of the volume of web page content served over the HTTP protocol.

If you are having difficulties with getting mod_gzip to work when compiled with using easyapache, then you can go and use this step by step manual install.

Log into you server using shell and your root account and download mod_gzip- (or whatever the latest version) from

I used

after that

tar -zxvf mod_gzip-
cd mod_gzip-

make APXS=/usr/local/apache/bin/apxs
make install APXS=/usr/local/apache/bin/apxs

Then edit your httpd.conf file

pico /etc/httpd/conf/httpd.conf

and add the following (in the AddModule stuff):

first uncomment:

#LoadModule gzip_module libexec/
LoadModule gzip_module libexec/


#AddModule mod_gzip.c
AddModule mod_gzip.c

and after AddModule mod_gzip.c add this below

<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_can_negotiate Yes
mod_gzip_static_suffix .gz
AddEncoding gzip .gz
mod_gzip_update_static No
mod_gzip_command_version ‘/mod_gzip_status’
mod_gzip_temp_dir /tmp
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 500
mod_gzip_maximum_file_size 500000
mod_gzip_maximum_inmem_size 60000
mod_gzip_min_http 1000
mod_gzip_handle_methods GET POST
mod_gzip_item_exclude reqheader “User-agent: Mozilla/4.0[678]”
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.shtml$
mod_gzip_item_include file \.htm$
mod_gzip_item_include file \.shtm$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.phtml$
mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude file \.css$
mod_gzip_item_exclude file \.wml$
mod_gzip_item_include file \.pl$
mod_gzip_item_include file \.cgi$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/html$
mod_gzip_item_include mime ^text/plain$
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include mime ^application/x-httpd-php
mod_gzip_item_include handler ^perl-script$
mod_gzip_item_exclude mime ^image/
mod_gzip_dechunk Yes
mod_gzip_add_header_count Yes
mod_gzip_send_vary Yes

Then restart apache with

service httpd restart

That’s about it. There is nothing too typical about installtion and getting it to work, except for in cases where one is using mod_proxy also for proxying a back-end httpd in which case mod_gzip would fail because of a bug. Other than that it works fine.

Compiled tutorial with info from Anup 🙂

Oh, and nearly forgot; you can check if you have successfully installed gZip by going here :

Facebook Comments

More Stuff

Emblematic Group and Mozilla Team Up to Showcase Next Generation o... Everything you share on the internet is a story. You read blog posts and watch videos that make you feel connected to people across the world. Virtual...
Latest Firefox Release is Faster than Ever With the introduction of the new Firefox Quantum browser in 2017 we changed the look, feel, and performance of our core product. Since then we have la...
Competing without a Marketing Budget: When All You Have is a Produ... This is a story about the power of a good landing page, PR efforts, and marketing strategy. The refreshing twist here is that instead of explaining ho...
The Ongoing Fiasco and Mysterious Afterlife of QuadrigaCX I’d say you were a little late to the cryptocurrency party if you haven’t heard about the ongoing catastrophe that’s been QuadrigaCX these past six ...
Spread the love

Posted by News Monkey