Apache2 mod_deflate
The mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.
Lazy man's description, your pages load quicker.
Add the following code to your httpd.conf
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
I like to log things for no real reason
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate_log deflate
Related posts:
- Enabling mod_deflate/gzip globally on cPanel
There's far too many reasons to mention why you should enable mod_deflate to gzip your... - My Best Firefox Extensions
I've got several Firefox extensions that I simply cannot live without these days. British English... - NTLM Authentication on Ubuntu and Apache2 Revisited
It's been a while since I've had to build an NTLM integrated Apache2 server. So... - Auto Updating GeoIP Binary Databases
Here's how I keep on top of updating the GeoIP binary databases used by various...