DZone 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

Snippets has posted 5883 posts at DZone. View Full User Profile

Apache2 Ubuntu - Disabling Mod_deflate

  • submit to reddit
        When using apache2 with the Debian style mods-enabled configuration, I have recently noticed that mod_deflate sets a nasty default for compressing content.  If you wish to run mod_deflate on some virtual hosts, but disable it for others you may have to edit /etc/apache2/mods-available/deflate.conf like so:

<IfModule mod_deflate.c>
          # Commented out filter below to disable default compression to allow some 
          # virtual hosts to have no compression.
          # AddOutputFilterByType DEFLATE text/html text/plain text/xml