Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-10-2005, 11:31 AM   #1
Registered: Dec 2004
Location: London, UK
Distribution: Fedora and CentOS
Posts: 43

Rep: Reputation: 15
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.

Old 02-10-2005, 12:41 PM   #2
Senior Member
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SELINUX or ls control of Apache mikeghet SUSE / openSUSE 0 10-28-2005 12:57 AM
SELinux + Apache + MySQL + PHP SADANA Fedora 6 03-28-2005 10:06 PM
SElinux & php4 & interbase & apache maxut Linux - Security 0 03-15-2005 04:57 AM
Apache/PHP problems with Selinux enforcing.... maxie_fc3 Fedora 0 01-11-2005 07:40 AM
Selinux fedorafreak Fedora 2 08-15-2004 09:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration