question about selinux and apache
I just configured my apache on CentOS 5.5. It started up. I then configured my VirtualHosts to have 2 definitions. Copied the example from the file for now. Restarted the httpd process and I get this:
Code:
Starting httpd: Warning: DocumentRoot [/home/mysite] does not exist Quote:
None of the posts I read explained why you needed to disable it and if you could re-enable it. I tried to go to the http://www.apache.org site and it says its not responding. So I cannot look things up there. I found this link after some searching but I dont understand the chcon command and dont want to munge my system: http://www.centos.org/modules/newbb/...=2147&forum=31 Code:
ls -al --contex /home Code:
[root@loxww35 audit]# ls -al --contex /home/www Code:
$ service httpd start |
Quote:
What does work is the documentation Centos and Fedora come with. Httpd by default is not allowed to access users home directories. So first set the "httpd_sys_content_t" context reserved for serving content (see '\ls -dZ /var/www/html'): 'chcon -R -t httpd_sys_content_t /home/wwww/sample{1,2}_com ' and then enable with 'setsebool -P httpd_enable_homedirs 1'. See 'man httpd_selinux' for more. * It would be better if you don't tack on posts to your OP because when you do you lose thread 0-reply state (best use the edit button). ** Remember that being precise (exact error messages) and complete (in this case: the complete setroubleshoot or /var/log/audit/audit.log message) beats any "this doesn't work" or "I've got an error saying" description. |
Quote:
I will look up those articles you posted. |
If you want to you could start here: http://wiki.centos.org/HowTos/SELinux and here: http://docs.fedoraproject.org/en-US/..._examples.html.
|
// FUP
|
unix1adm: I've combined your first 5 posts into a single post to make it a little easier for people to read. I've also inserted some code tags. I have not, however, changed any of the contents of your posts.
|
All times are GMT -5. The time now is 09:35 AM. |