Sunday, November 7, 2010

Enable user directory (public_html)

edit /etc/httpd/conf/httpd.conf

remove this line
UserDir disable

and uncomment this line
UserDir public_html

(or can just change the first line)

Then restart the server
/usr/sbin/apachectl restart

If SELinux is enabled (I did), you must also need to run these

/usr/sbin/setsebool -P httpd_enable_homedirs true
chcon -R -t httpd_sys_content_t /home/user-abc/public_html

(do not forget to change the path on the second line)


from Apache Userdir with SELinux on Fedora 13/14, CentOS 5.5, Red Hat (RHEL) 5.5/6

No comments:

Post a Comment