Tuesday, December 15, 2009

CIFS Mounted Drive for Apache

My environment: Apache 2.2.9 on Fedora Core 10 x86_64

Although it is not a good idea to do something like this, I’ve come across a case that I need to mount a CIFS drive and serve the content inside for an apache web server on Linux.  After some googling, the trick to make this work is to turn off a parameter called EnableSendfile in httpd.conf

#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems.  Please see
#
http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
#
EnableSendfile off

No comments:

Post a Comment