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've come across some article online to enable mod_deflate to gzip files while sending from the server.

For that, I tried to load the module by adding a line on my httpd.conf

LoadModule deflate_module modules/

But it seems the file is missing from the server.

I tried a find / -name "" -print but it returns no results.

So how do I compile and add mod_deflate to my modules directory?


I found out this tutorial at

Step 1 says:

Hack apr-config located in the /usr/local/apache2/bin directory so 
the LDFLAGS will have the "-lz" value similar below:

What does 'Hack apr-config' this mean?

share|improve this question
What is your OS? – xofer May 23 '12 at 15:27
I'm on Fedora.. – ptamzz May 24 '12 at 15:29

Did you build apache from source? If so, you may need to recompile apache with the option: --enable-deflate

share|improve this answer
I'm not sure about that because I took help from a friend. Can you please elaborate on that - recompiling apache (noob here). Thanks. – ptamzz May 23 '12 at 7:01
@ptamzz better ask your friend then, he should know what's installed and how. – Oliver May 23 '12 at 7:08

try run "sudo a2enmod deflate".

Then restart apache.


$ sudo a2enmod deflate Enabling module deflate. To activate the new configuration, you need to run: service apache2 restart $

share|improve this answer

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.