mod_deflate?? what is that?.. from apache documentation, mod_deflate is module that provide the deflate output filters that allows output from your webserver to be compressed before being sent to the client over the networks. mod_deflate is additional module in apache. you can enabling or disabling this module up to you. but i recomended you activating this module.How to activating this module, will explained in this blog. just wait and continue reading :p
mod_deflate formerly known as mod_gzip (in apache 1.3). some advantage if you using mod_deflate :
- minimize bandwidth output from a website.
- decrease the amount time and data transmitted in networks, resulting faster web access and download for the client.
next, i will explain you how to activating mod_deflate in httpd-2.2.x In this case (my server),installed apache from source (compiled manyally), mod_deflate is disabled
, php-mysql enabled,additional apache module-mod_security, and of course FreeBSD!!!!! . Very simple to activating mod_deflate module, just follow this step :
- first, locate mod_deflate.c then go to the directory contain mod_deflate.c files
- path_to_apache_/bin/apxs -cia mod_deflate.c (if you get no errors, congragulations, you have activated mod_deflate module). for ensuring that module has been installed, check your httpd.conf, if you see this line “LoadModule deflate_module modules/mod_deflate.so”, mod_deflate has been installed.
heheheheh……….. we are not finished yet. buy some cigaretes first. heheheheheh lol lol lol lol..
okey, now the most interesting part, adding mod_deflate rules in your httpd.conf. open your httpd.conf and add this line in your document_root path :
<Directory “/web/wiw”>
………..
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
</Directory>
close and save your httpd.conf file. restart your apache………
if you wanna see the output benchmark go to this url : http://www.whatsmyip.org/mod_gzip_test/
this tutorial only give you a simple mod_deflate rules……..
hehehehhe…… happy research……….
Recent Comments