mod_deflate

Guillermo

Verified User
Joined
May 20, 2006
Messages
95
Location
The Netherlands
I would like to use mod_deflate for all my websites, but i have problems installing it. Does any of you use mod_Deflate? If so, how did you install/configure it?
 
Hi,

First of all make sure "--enable-deflate" is in your /usr/local/directadmin/customapache/configure.apache_2

Then rebuild apache.

Afterwards edit you /etc/httpd/conf/httpd.conf and make sure you have contained in it.

Code:
<IfModule mod_deflate.c>
  # place filter 'DEFLATE' on all outgoing content
  SetOutputFilter DEFLATE
  # exclude uncompressible content via file type
  SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip|exe)$ no-gzip
  <IfModule mod_headers.c>
    # properly handle requests coming from behind proxies
    Header append Vary User-Agent
  </IfModule>
</IfModule>
# deflate.log, log compression ratio on each request
<IfModule mod_deflate.c>
  DeflateFilterNote Input instream
  DeflateFilterNote Output outstream
  DeflateFilterNote Ratio ratio
  LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
  CustomLog logs/deflate.log deflate
</IfModule>

# Properly handle old browsers that do not support compression
<IfModule mod_deflate.c>
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

Restart Apache and then goto http://www.port80software.com/tools/compresscheck and enter URL hosted on your server. Make sure its not a site that has a 3rd Party script like vBulletin as this can compress by itself and give a false impression that mod_deflate is installed.

Regards,
Grant
 
Thanks.
Does it matter where i place the <imodule>code</ifmodule> in the httpd.conf? Does it have to be on top or bottom or?

I have mod_sec and some other stuff installed, do i have to reinstall it after i rebuilt apache?
 
Last edited:
Anyone?

What happens after i have rebuilt apache? Do i have to install directadmin, and stuff like zend, eaccelerator etc again? And what about the httpd.conf, will it be replaced by a default one?
 
What does mod_deflate do ?

We have http 1.1 gzip compression which can be enabled, and zend.
 
Guillermo said:
Anyone?

What happens after i have rebuilt apache? Do i have to install directadmin, and stuff like zend, eaccelerator etc again? And what about the httpd.conf, will it be replaced by a default one?

thanks for how-to on mod_deflate, working great for me now :)

anyway after i rebuild apache, i didnt need to rebuild the rest like php, zend, eaccelerator
 
Back
Top