I know that my site is not sending data gzipped. I tested that using site like http://www.gidnetwork.com/tools/gzip-test.php
Now I want to know if apache is compiled with gzip module or not. Before I put in the code that will serve the compressed content I want to test if gzip is enabled on my apache server or do I need to build it. How do I test that. How do I put a debug statement that will show up in apache log. I believe I can do something like this but not sure.
<IfModule mod_gzip.c>
log('apache is configured with gzip. no need to install it')
</IfModule>
What code will go in place of log so that I could see the message in apache log. Also how can I write else statement so that I get a message either way.
Here is my apache.conf
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations:
Include /etc/apache2/httpd.conf
# Include ports listing
Include /etc/apache2/ports.conf
This is the list of items in mods-enabled directory
root@me:/etc/apache2/mods-enabled# ls
alias.conf authn_file.load authz_host.load autoindex.load dir.load mime.load setenvif.conf status.load
alias.load authz_default.load authz_user.load cgi.load env.load negotiation.conf setenvif.load
auth_basic.load authz_groupfile.load autoindex.conf dir.conf mime.conf negotiation.load status.conf
Best Answer
try running from command line:
this should give you list of modules built into apache. more probably you'll have gzip as additional loadable module called
mod_deflate.so
- check if any of your .load loads this one.if you use debian'ish distro [ it seems so ] just symlink deflate.load and deflate.conf from mods-available to mods-enabled:
and reload apache2