<IfModule mod_deflate.c> SetOutputFilter DEFLATE SetInputFilter DEFLATE #the two above compress everything unless excluded below 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 SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.plist$ no-gzip dont-vary # Below is an example where you get rid of what's above and you explicity compress AddOutputFilterByType DEFLATE application/x-httpd-php application/x-httpd-fastphp application/x-httpd-eruby text/html DeflateFilterNote ratio DeflateCompressionLevel 9 </IfModule>
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Mixed example of mod_deflate configuration for httpd.conf (See related posts)
Comments on this post
http://railsgeek.com/2008/12/16/apache2-httpd-improving-performance-mod_deflate-gzip
You need to create an account or log in to post comments to this site.
Related Posts
» Serve XHTML 1.1 Properly in apache httpd.conf xhtml
» A simple WebDAV repository w... in apache httpd.conf webdav
» A complete mod_deflate confi... in apache mod_deflate
» Suexec'ed PHP-FastCGI on Apa... in apache php fastcgi suexec
» Getting a copy of a x509 cer... in apache ssl openssl certifcates
» mod_rewrite rules to serve a... in apache xhtml modrewrite mimetype htaccess
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails
http://railsgeek.com/2008/12/16/apache2-httpd-improve-perfomance-mod_deflate-gzip