tags:

views:

340

answers:

4

Is there such a command that can tell this?

A: 

You'll want to make sure the following line is present (and not commented out) in your apache configuration (httpd.conf):

LoadModule deflate_module modules/mod_deflate.so

The commented out version looks like:

# LoadModule deflate_module modules/mod_deflate.so

Then to have it deflate files as they are served, you'll need a line in your .htaccess, like this:

AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript
karim79
Seems this module is automatically built-in if there is --enable-deflate option.
Shore
A: 

You can verify mod_deflate with this site:

mod_deflate test

My site gets a nice little report that shows I'm saving 81% of my bandwidth!

dicroce
A: 

I agree with the comments 'in what context' but to cover all bases (in addition to the other responses) you may also be able to run;

a2enmod deflate

This should work on many servers that run Apache (especially Debian based ones), in the event the module is already enabled the command will tell you, if the module isn't enabled the command will enable it. It may also tell you that the module doesn't exist in which case you will need to install it.

digitalpardoe
A: 

It is probably to late, but here we go.

mod_deflate is enabled per default. To be sure, try

apache2ctl -t -D DUMP_MODULES

and look if there is a deflate_module.

Juri Glass