Setting up user directories for Apache (i.e. ~user) on CentOS 5:
- Change the
/etc/httpd/conf/httpd.conf
and comment out:UserDir disable
and un-comment:
UserDir public_html
- Restart Apache.
- Create a
public_html
directory in the user’s home directory. - Make sure it has permissions 0755.
- Make sure their home directory has permission 0711.
- Make sure that
public_html
directory has SELinux context:user_u:object_r:httpd_sys_content_t
- Make sure that the SELinux boolean
httpd_enable_homedirs
is set to "on".