11
2009
Userdir apache centos
Setting up user directories for Apache (i.e. ~user) on CentOS 5:
Change the /etc/httpd/conf/httpd.conf to 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”.
# mkdir /etc/skel/public_html
# mkdir /etc/skel/public_html/cgi-bin
# chmod 705 /etc/skel/public_html
# chmod 705 /etc/skel/public_html/cgi-bin/
# echo ‘Test User Page !’ > /etc/skel/public_html/index.html
# chmod 604 /etc/skel/public_html/index.html
### SELinux ONLY – Enable User Website
# setsebool -P httpd_enable_homedirs true
# chcon -v -R -h -u user_u -t httpd_user_content_t /home/*/public_html
Leave a comment
Kategorije
- Ostalo (161)
- Računalništvo (266)
- Centos (34)
- CSS (2)
- FreeBSD (37)
- jQuery (1)
- MySQL (8)
- Na spletu dogaja … (124)
- Netbeans (4)
- PHP (20)
- Symbian (3)
- Ubuntu (32)
- Windows (5)
- Zend Framework (6)
- Zend Studio (1)
Blogroll
Arhiv
- February 2011 (5)
- December 2010 (4)
- November 2010 (2)
- October 2010 (5)
- September 2010 (6)
- August 2010 (5)
- July 2010 (10)
- June 2010 (9)
- May 2010 (10)
- April 2010 (8)
- March 2010 (12)
- February 2010 (19)
- January 2010 (20)
- December 2009 (10)
- November 2009 (1)
- October 2009 (3)
- September 2009 (2)
- August 2009 (9)
- June 2009 (11)
- May 2009 (5)
- April 2009 (6)
- March 2009 (9)
- February 2009 (15)
- January 2009 (10)
- December 2008 (17)
- November 2008 (20)
- October 2008 (16)
- September 2008 (48)
- August 2008 (56)
- July 2008 (35)
- June 2008 (35)
An article by




