United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
If you are using an NFS or CIFS mount as DocumentRoot on the Apache web server included with Red Hat Enterprise Linux 5, you may need to disable the EnableMMAP and/or EnableSendfile options in /etc/httpd/conf/httpd.conf. They are set to "on" by default:
# # EnableMMAP: Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap # #EnableMMAP off # # 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
The most common symptom of these settings being incompatible with an NFS or CIFS mounted directory is corrupted, truncated or blank files being served by the web server. Administrators may observe that files below a certain size will transfer without issue, but larger files will be truncated or come through with a zero byte file size. File commands like vi, cp or rm still work as expected on files in the mounted directory, which distinguishes this from such problems such as incorrect file permissions or incorrect mount options. The problem is only seen when accessing files inside the mounted directory through the Apache web server.
For more information, please follow these links, which are taken from the httpd.conf file excerpt shown above:
EnableMMAP
http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
EnableSendfile
http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile