How to disable gzip compression for particular virtual host apache

apache-2.2compressiongzip

Im using Apache and I have enabled zip compression to all my virtual host domain. However, I want to disable the gzip compression on one particular virtual host only. I try this method.

All separated virtual host file i.e. domain.com.conf has this lines to enable the compression – http://pastebin.com/LV6Tyv38

Now, I created domain1.com.conf without inculding compression line stated on the link and I expect gzip compression is disabled only for domain1.com. BUT, when I checked the HTTP header, I can still get these outcome.

Content-Encoding: gzip
Vary: Accept-Encoding

I would appreciate if anyone could help me to shed some lights on how to properly disabled zip compression for a particular virtual host in apache.

Thanks.

JamesW

Best Answer

There really shouldn't be any reason to disable it, but..

SetEnv no-gzip 1