Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having some trouble with mod_deflate… Specifically, that it's not actually deflating anything.

I'm running Apache2 and Debian 4. I've a2enmod deflate'd, and put this in /etc/apache2/mods-enabled/deflate.conf:

AddOutputFilterByType DEFLATE text/html text/plain

Yet, when I curl -I http://host/robots.txt, I don't see any headers suggesting the output is being deflated (and this suspicion is confirmed when I tail access.log, and see that my DeflateFilterNote in the logs is -). I know that "it's plugged in", because if I add:

SetEnv force-gzip "yes"

The output is compressed.

So, am I doing something obvious and stupid wrong? Or… What?

share|improve this question
up vote 5 down vote accepted

mod_deflate won't send compressed output unless the client indicates that it supports it. The client does this by sending a header of Accept-Encoding: gzip in the original request.

curl doesn't do this by default. But you can instruct it to do so with the command:

curl --compressed -I http://host/robots.txt
share|improve this answer
D'oh! Thanks. I was mistaking curl's Accept: */* for Accept-encoding. Clearly tinkering with HTTP is the wrong thing to do first-thing monday morning… – David Wolever Oct 19 '09 at 13:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.