Web Hosting Talk







View Full Version : How to correct various mod_gzip issues


LP-Trel
07-31-2004, 02:25 AM
When using mod_gzip you may find various quirks and problems with it because it is currently unmaintained and has known issues. Some of these can be worked around using certain configuration options to make mod_gzip usable in a production environment.

This configuration has been used/tested on production Linux/FreeBSD boxes using mod_gzip with Apache 1.3.x. Your mileage with this configuration may vary.

Note: When using cPanel make sure to remove the existing mod_gzip configuration (or comment it out) before using this.


<IfModule mod_gzip.c>
mod_gzip_on Yes
<Files ~ "\.(gif|jpe?g|png|bmp)$">
mod_gzip_on no
</Files>
mod_gzip_dechunk Yes
mod_gzip_send_vary Yes
mod_gzip_keep_workfiles No
mod_gzip_temp_dir /tmp
mod_gzip_command_version '/mod_gzip_status'
mod_gzip_minimum_file_size 1002
mod_gzip_maximum_file_size 0
mod_gzip_maximum_inmem_size 100000
mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
mod_gzip_item_include file \.htm$
mod_gzip_item_include file \.html$
mod_gzip_item_include mime ^text/.*$
mod_gzip_item_include mime ^application/postscript$
mod_gzip_item_include mime ^application/ms.*$
mod_gzip_item_include mime ^application/vnd.*$
mod_gzip_item_exclude mime ^image/.*$
mod_gzip_item_exclude mime ^application/x-javascript$
mod_gzip_item_exclude mime ^application/pdf$
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.phps$
mod_gzip_item_include file \.pl$
mod_gzip_item_include file \.cgi$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^application/x-httpd-php.*
mod_gzip_item_exclude file \.css$
mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude file \.wml$
</IfModule>


Any feedback will be appreciated. :)

madguy24
08-08-2004, 08:35 PM
Good one...

For Apache 2.0

http://www.gknw.com/development/apache/httpd-2.0/unix/modules/mod_gzip-2.0.40.tar.gz

Off topic ..But anyone know of mod_bandwidth (not throttle or bwshare) for Apache 2.0 ?

andy18
08-27-2004, 04:28 PM
how do you determine if the files requested by the client is compressed ? Any way I can use to see the full header dump by my IE client ?

Haze
08-28-2004, 04:52 AM
Check your apache access_log, should be there.