Thursday, May 15, 2008

Apache 2 Compression with mod_deflate

Today, after a report from one my users that the our APEX application was getting "slower", I decided to implement mod_deflate for content compression. The performance is noticeable faster! I went with mod_deflate since is included in the Apache 2.0.x source package. Here is what I added to my httpd.conf:

LoadFile /usr/lib/
LoadModule deflate_module modules/

<IfModule mod_deflate.c>
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|htc|wsdl|exe|t?gz|bz2|sit|rar|pdf|zip)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

After that I all did was a quick
opmnctl restartproc ias-component=HTTP_Server
and voila!

For more information on mod_deflate go to


Dimitri Gielis said...

Cool to see another Apex Blog.

John Scott said...

Yep, nice to see another APEX related blog out there.

BTW I also wrote a whitepaper last year on configuring mod_gzip and mod_deflate in relation to APEX apps, available here:



james said...

hi! i like the designs. check out the source of the template.
Thank you! i love it.
More templates easy to download

Sildenafil Citrate said...

I can recall that same issue when I was using your APEX application, but I did not have time to call you guys or send you an email, a friend helped to solve the issue anyway

Livrare Flori said...

It's great to see how you give us cool things that makes our jobs easier.

alfred said...

This is similar to the web-server idea and will still require Apache to be installed. Because it is just an FTP server (a place for you to store your files remotely) you will not need to setup any other complicated things like PHP or MySQL etc.

apache jobs

Math Classes Sydney said...

The learning lab is providing the best Maths and English tutor in Sydney and if you are looking for maths tutor for your child contact us now!

Melisa Marzett said...

The performance is noticeable faster! I like the way you work - it's very convenient to use your article to implement mod_deflate for content compression. There is one more question for you... who can write my paper for me?

ecommerce web developer said...

Many websites has good collection of information but this one has great collection and combination of information.ecommerce web developer said...

I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this

line icons said...

Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I’ll be sure to check back again real soon.line icons said...

I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.

currency exchange rates said...

A healthy diet is not about strict nutrition philosophies, staying extremely thin, or depriving yourself of foods you love. Rather it is to get that good to have more energy and you keep healthy as possible.currency exchange rates

texas ecommerce web development said...

Pues la verdad, tampoco hay que agacharse mucho, ¿no? para darle la vuelta a la carne de vez en cuando y ya está... Es que nosotros las veces que habíamos hecho barbacoas era en el fuego a tierra, así que también nos teníamos que agachar.texas ecommerce web development

dallas web designer said...

Good website! I truly love how it is easy on my eyes it is. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your RSS which may do the trick? Have a great day!dallas web designer

cheap money transfer said...

Its like you read my mind! You appear to know so much about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but other than that, this is great blog. A great read. I will certainly be money transfer

shahbaz said...

feast for women of all ages and the men who love them!" and CBS’ Magee Hickey “I haven't laughed so hard in years. It's touching, poignant, funny and oh so very real."tree trimming long island

Alvira Li said...

audemars piguet replica
Universal Portuguese Series 75th Cartier Japanese Quartz Tonneau Anniversary Masterpiece New Exhibition and Tabulation Classes Beijing Railway Station Then, the barrel will be installed in the tado replica watches movement, the installation should be tilted to the inside delivery.