A good page that helps you to make this decision is Martin Kiff's document about mod_gunzip http://www.innerjoin.org/apache-compression/howto.html
Origin-Site: http://prdownloads.sourceforge.net/mod-gzip/mod_gzip-1.3.26.1a.tgz?download
To successfully compile mod_gzip you need to edit the Makefile and provide the correct path to apxs
make make install |
Put the following in your /usr/local/apache/conf/httpd.conf:
Example 5. /usr/local/apache/conf/httpd.conf
mod_gzip_on Yes mod_gzip_can_negotiate Yes mod_gzip_dechunk Yes mod_gzip_minimum_file_size 600 mod_gzip_maximum_file_size 0 mod_gzip_maximum_inmem_size 100000 mod_gzip_keep_workfiles No mod_gzip_temp_dir /usr/local/apache/gzip mod_gzip_item_include file \.html$ mod_gzip_item_include file \.txt$ mod_gzip_item_include file \.jsp$ mod_gzip_item_include file \.php$ mod_gzip_item_include file \.pl$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-httpd-php mod_gzip_item_include mime ^httpd/unix-directory$ mod_gzip_item_include handler ^perl-script$ mod_gzip_item_include handler ^server-status$ mod_gzip_item_include handler ^server-info$ mod_gzip_item_exclude file \.css$ mod_gzip_item_exclude file \.js$ mod_gzip_item_exclude mime ^image/.* |
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" mod_gzip: %{mod_gzip_compression_ratio}npct." combined |
tar -xvzf mod_gunzip.tar.gz cd mod_gunzip-2 /usr/local/apache/bin/apxs -i -a -c -lz mod_gunzip.c |
Put the following in your /usr/local/apache/conf/httpd.conf:
Example 6. /usr/local/apache/conf/httpd.conf
AddType text/html .htmz AddHandler send-gunzipped .htmz |
Now you can gzip your html files and rename them to i.e:
gzip index.html mv index.html.gz index.htmz |
Of course you have to change all links to htmz, i.e. <a href="page.htmz">Some page</a>