LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 02-10-2005, 12:31 PM   #1
azrael808
Member
 
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.

Pete
 
Old 02-10-2005, 01:41 PM   #2
marghorp
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.
 
  


Reply


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 -Z..no control of Apache mikeghet Suse/Novell 0 10-28-2005 01:57 AM
SELinux + Apache + MySQL + PHP SADANA Fedora 6 03-28-2005 11:06 PM
SElinux & php4 & interbase & apache maxut Linux - Security 0 03-15-2005 05:57 AM
Apache/PHP problems with Selinux enforcing.... maxie_fc3 Fedora 0 01-11-2005 08:40 AM
Selinux fedorafreak Fedora 2 08-15-2004 10:41 AM


All times are GMT -5. The time now is 09:16 PM.

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