Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What's the correct setup if I want to add Apache2 VirtualHost /home/X/public_html (I'm getting this error: [Wed Jun 29 00:38:45 2011] [error] [client x] (13)Permission denied: access to / denied)

Selinux is disabled:

[root@server httpd]# sestatus
SELinux status:  disabled
[root@server httpd]#
share|improve this question

2 Answers 2

I'm somewhat confused. Do you want to give users the ability to publish web from their home directory? If so, see the userdir module: http://httpd.apache.org/docs/2.2/mod/mod_userdir.html

If you want to just have a VirtualHost pointing to /home/X/public_html, you write a VirtualHost section.

Having said that, the error message "Permission denied: access to / denied" seems fishy. Unless I am much mistaken, / here is a directory and not a location, meaning your web server can't read the filesystem root dir, which would indicate something more basic is broken/misconfigured.

share|improve this answer
    
No, userdid is not the right solution here. I want to have seperate user (not root) which has public_html in his home directory and stores there a website. Also a VirtualHost param DocumentRoot pointing to /home/X/public_html. The thing is, apache doesn't have rights to access /home/X/public_html (DocumentRoot) and i get 403 forbidden. I want the right solution (security-wise) for providing apache permissions here. –  Vytautas Jun 28 '11 at 21:51

Apache needs to be able to read the directory. The usual way is to make /home/X/ and /home/X/public_html readable by group and add the X user to the apache group.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.