LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache and selinux (http://www.linuxquestions.org/questions/linux-software-2/apache-and-selinux-288556/)

azrael808 02-10-2005 11:31 AM

Apache and selinux
 
Hi all,

I've just tried to run apache 2 on a fresh install on Fedora Core 3, with all the latest updates. However, I get the error message:

DocumentRoot must be a directory

or something similar when I try to start apache. I tried setting the document root to just /home (from the default, /var/www/html), and I was able to start the server.

After a bit of googling, I found some info about selinux causing difficulties, so I disabled it and tried running the server with the DocumentRoot set to /srv/www/htdocs (my ideal documentroot location) and lo and behold, it works!

I would like to be able to have the directory /srv/www/htdocs as my DocumentRoot, but with selinux enabled, this does not appear possible. Could somebody either tell me what (and where) policy I need to edit to allow this? Failing that, a pointer in the direction of a decent selinux tutorial would be most useful

Thank you.

Pete

marghorp 02-10-2005 12:41 PM

I read somewhere, that the directory for the server to use, must be owned by apache user or some other user, set in the httpd.conf file.

Try changing that.


All times are GMT -5. The time now is 11:13 AM.