Print Friendly

Setting up user directories for Apache (i.e. ~user) on CentOS 5:

  1. Change the /etc/httpd/conf/httpd.conf and comment out:
    UserDir disable

    and un-comment:

    UserDir public_html
  2. Restart Apache.
  3. Create a public_html directory in the user’s home directory.
  4. Make sure it has permissions 0755.
  5. Make sure their home directory has permission 0711.
  6. Make sure that public_html directory has SELinux context:
    user_u:object_r:httpd_sys_content_t
  7. Make sure that the SELinux boolean
    httpd_enable_homedirs

    is set to "on".