SELinux: NFS-Apache/httpd setup

  • How to enable Apache to read NFS mounted directories while SELinux is enabled.

You might need to use the command similar to one below if you are on redhat distibution like CentOS or Fedora...

mount -t nfs -o context=system_u:object_r:httpd_sys_content_t /var/www/html/images

If that still does not work, then let SELinux allow Apache to read on the mounted directory..
setsebool -P httpd_use_nfs on
sudo /usr/sbin/setsebool -P httpd_use_nfs on


- _

Add Comment

Sorry you must log in first to be able to add a comment. Click here to log in.
*/ ?>