Apache not serving static files correctly?

Note: This is an old post in a blog with a lot of posts. The world has changed, technologies have changed, and I've changed. It's likely this is out of date and not representative. Let me know if you think this is something that needs updating.

I innocently did an apt-get dist-upgrade today and suddenly Apache wouldn't serve any static files, but anything generated by CGI scripts worked super! Apache would send the headers for static files complete with a Content-Length correctly but wouldn't send any data in the HTTP response (even for an HTTP 200).

I spent hours trying to figure out what was going on under the assumption that I did a bad upgrade. I skimmed documentation, made sure my conf files were ok, did dozens of Google searches and then finally gave up and walked away for a couple of hours.

Long story short I finally hit gold with the right mantra of search terms and bumped into the EnableSendFile diretive. I added:

EnableSendFile Off

to my Apache conf file and it works fine now.

I mention it in case someone else does a dist-upgrade with Debian testing on or around November 15th, 2006 and discovers themselves in the same boat.

Want to comment? Send an email to willkg at bluesock dot org. Include the url for the blog entry in your comment so I have some context as to what you're talking about.