check gzip compression is enable or not

How to check gzip compression is enable on the server or domain.
The gzip compression required mod_gzip.c or mod_deflate.c module installed on the server.
How you can check this module installed on  the server
root@server [~]# /usr/local/apache/bin/httpd -l
or
root@server [~]# httpd -l
If one of the module is installed on the server then, you can enable the gzip compression for the account as follows.
You can check it by using the following commands

For Apache 1::
# /usr/local/apache/bin/httpd -l 
For Apache 2::
# httpd -l

You need to add the following code into the .htaccess file to enable the gzip compression for the domain.

#compress all text & html:
AddOutputFilterByType DEFLATE text/html text/plain text/xml
# Or, compress certain file types by extension:
<Files *.html>
SetOutputFilter DEFLATE
</Files>

After adding above code in .htaccess file, you can check the gzip compression is enable or not by using the following URL.
http://www.feedthebot.com/tools/gzip
When you enter the domain name in the above URL then it shows the
Web page compressed? Yes
Compression type? gzip

Leave a Comment