views:

22

answers:

1

I am trying to figure out how to disable the DEFLATE module (gzipping) for a specific directory on my server. This is what I have in /etc/httpd/conf/httpd.conf

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

I can add something to my .htaccess file in the specific directory or even add a something to my /vhosts/domain.com/httpdocs/conf/vhosts.conf file. I can't seem to get it to work though. Any suggestions?

A: 

I removed my original code from /etc/httpd/conf/httpd.conf and added this to my vhost.conf on this domain

<Directory "/var/www/rockchurch.com/httpdocs">
AddOutputFilterByType DEFLATE html txt xml css js php
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

php_admin_value open_basedir none
php_admin_value safe_mode off
Options FollowSymLinks
</Directory>

<Directory "/var/www/rockchurch.com/httpdocs/tiny">
RemoveOutputFilter DEFLATE html txt xml css js php
</Directory>

And works well. Apparently having it in /etc/httpd/conf/httpd.conf universally adds it to all domains, which is great, but can't be changed in specific directories elsewhere.

michaelespinosa