Musings about Coding, Business and other Geek Stuff Live and Direct from somewhere on the planet
January 11, 2003
Running Apache 2.0 on a John Companies server

If you've installed Apache 2.0 and are having strange problems with html files, whete it sends the full correct http header including file size, but then doesnt actually send the file, read on.
John Companies runs their servers using an amazing piece of software called Virtuozzo from Russian Software Companie SW Soft. They've come up with an amazing way of virtualizing apparently independent linux or freebsd servers on a single machine.
Many companies offer Virtual Dedicated Servers using this technology today. (of course Johns Companies is the best).
One feature of Virtuozzo is the dynamically reconfigurable filesystem vzfs, which allows the admins to increase and decrease and move clients file systems in real time.
One side effect of this file system is that it doesnt have support for Unixes send_file support as I discovered the other night when I was trying to get Apache 2.0 to install.
After lots of messing about I discovered that it was Apache 2.0's default use of send_file in unix. So this is how to switch it off if you're having similar problems.
With any current version of Apache 2.0 <= Apache 2.0.43
You do a
./configure --without-sendfile
and then build as normal.
With the next version (>= Apache 2.0.44) nThere is a runtime configuration directive for the httpd.conf file:
EnableSendfile Off
That should get it working for you.

Posted by pelleb at January 11, 2003 06:33 PM
This entry was posted in the following Categories: Open Source
Comments

Thanx I need this very badly :)

Posted by: Martin van den Bemt on June 25, 2003 06:04 PM

I hit this one too. Resolved by downloading/installing/compiling latest apache source (required, else EnableSendfile Off isn't recognized) and adding that line to httpd.conf.

But now I'm having similar problems (zero length files) from rsync. I.e.

[bcox@pcp750640pcs:~]$ rsync -avv geodesic/index.html vs2:geodesic/
opening connection using ssh vs2 rsync --server -vvlogDtpr . geodesic/
bcox@vs2's password:
building file list ...
expand file_list to 4000 bytes, did move
done
cfatr.124636.1/index.html.124636
index.html
index.html/rsrc
total: matches=0 tag_hits=0 false_alarms=0 data=8423
wrote 8617 bytes read 36 bytes 1331.23 bytes/sec
total size is 8383 speedup is 0.97

but geodesic/index.html is zero length on destination (vs2), multi bytes on source machine. Note rsync sez all is fine, same symptom as with httpd.

Please cc: bcox@virtualschool.edu on any replies.

Posted by: Brad Cox on October 20, 2003 01:01 PM

On a scale from 1 to 10 you deserve 100 !
I spent days crawling between mailinglists, support forums, faqs, documentation with no result.

Then I found this article : BINGO !!!

Thanks

Posted by: Andrea Forghieri on November 28, 2003 09:11 AM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?