1

I am using httpd server on CentOS (with SELinux enabled). I want to use UserDir (public_html)

If I create the user on local system it works but when I give the path on NFS shared system it gives 404 error.

I am using this directive: <Directory /nfs/*/*/public_html>

If I try to access http://domain/~user In error logs of httpd it says /var/www/html/~user not found. Somehow it is not going to path /nfs/students/user/public_html. What's the solution for this?

I have set the boolean with setsebool -P httpd_allow_nfs on and nfs is mounted with options defaults,nosuid,nodev (can I add noexec to it)

1 Answers1

0

Checkout https://httpd.apache.org/docs/2.0/mod/mod_userdir.html

The UserDir directive is used to tell apache how to transform those http://domain/~user requests to local path.

Search for the UserDir setting in your apache configuration and set it to:

UserDir /nfs/students/*/public_html

or append the new pattern (UserDir accepts multiple patterns).

Anil
  • 116