3

Is there a way to disable the deflate module on a per site basis in Apache2?

I have a legacy website that uses custom mime type server side includes that are breaking with the deflate module enabled. My guess is that the included file is being encrypted twice: once when included and then again when the response is sent.

I can disable the deflate module for Apache2 as a whole and the issue goes away, but I'd rather not be required to disable for all sites.

Has anyone had any success disabling deflate with an Apache conf directive?

UPDATE

I've successfully disabled DEFLATE for the virtual site using SetEnv no-gzip 1:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName www.domain.com
    DocumentRoot /var/www/domain.com/www/
    ErrorDocument 404 /404.html
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    SetEnv no-gzip 1
    <Directory />
            Options +Includes
            SetOutputFilter INCLUDES
            AcceptPathInfo On

            AddType text/x-jbase-html .jhtml
            Action text/x-jbase-html /cgi-bin/jBase.pl
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
</VirtualHost>
gurun8
  • 335
  • 1
  • 4
  • 11

1 Answers1

3

According to Apache documentation you could set internal variable no-gzip with SetEnv directive to disable compression.

AlexD
  • 8,179
  • 2
  • 28
  • 38