[clug-talk] Apache and FC3 - DocumentRoot does not exist
Jason Louie
jason.k.louie at gmail.com
Mon Feb 28 14:58:47 PST 2005
This is due to SELinux... I was just working in the issue today. You
either have learn how to use chcon to set the permissions or disable
SELinux with the command system-config-securitylevel, (I choose the
latter.) SELinux will cause issues particularly with diffrent
partitions for each service, (at least for me anyways.)
Just a note... if you choose to keep SELinux enabled expect similar
issues with postgresql, mysql and others. For me disabling SELinux
solved most the issues.
On Sat, 26 Feb 2005 17:25:11 -0700, Shawn <sgrover at open2space.com> wrote:
> I just ran into an odd problem, and think I have found a fix. But it took 2
> hours of google to find the fix. Perhaps someone can offer some insight?
>
> I'm using Fedora Core 3. I set up the httpd.conf file, and added a
> vhosts.conf file to the /etc/httpd/conf.d directory (all *.conf files in this
> directory are included into the main httpd.conf file). The virtual host I
> set up pointed the DocumentRoot to a directory in /home/www (the main
> server's DocumentRoot is at /var/www/html). When I tried to start the
> service, I would get a message something like this:
>
> Starting httpd: Warning: DocumentRoot [/home/www/myhost] does not exist
>
> But, typing in "cd /home/www/myhost" worked fine. So I thought it was a
> permissions problem, and set a <Directory> directive in the virtual host
> definition to allow all access, and even chown'd the directory to
> apache:apache (the user/group apache is running under). Restarting the
> service showed the same error message. So off to Google.
>
> It seems this is a common problem, but the solution is not easily found.
> After a loot of digging, I began to find references to SELinux being
> involved. I don't remember setting anything up for SELinux, but I guess FC3
> does automatically. After a bunch more digging, I came across this posting:
> https://www.redhat.com/archives/fedora-selinux-list/2004-September/msg00060.html
>
> The first tip works (though he mistyped the -t -R bit - they need to be
> swapped around). After doing
> "chcon -R -t httpd_user_content_t /home/www/myhost/"
> restarting the service didn't report the problem. AND navigating to that page
> actually did something other than giving me a 403 error.
>
> I feel this is a case where the symptoms do not match the cause of the
> problem. Who would have thought you'd need to either change the security
> context of your files, or disable selinux outright to set up a virtual host??
> It does make sense in a convoluted way though....
>
> Hope this helps someone else with this problem. And maybe someone can suggest
> a better solution???
>
> Shawn
>
> _______________________________________________
> clug-talk mailing list
> clug-talk at clug.ca
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>
More information about the clug-talk
mailing list