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>

1 Answer 1

3

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

2
  • 2
    I've tried a number of combinations using no-gzip with no success. Do you have suggestion for the directive syntax?
    – gurun8
    Jun 2, 2011 at 19:06
  • @gurun8 SetEnv no-gzip works for me (Apache 2.4.9).
    – Artem
    Aug 19, 2014 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .