I have set up apache on Centos 5.5 and am struggling with vhosts set up.
With the config I have set apache will correctly serve sites with a document root of
> ls -al
shows public_html and projects as having identical permissions (755)
drwxr-xr-x 6 myuser myuser 4096 Feb 8 10:05 .
drwxr-xr-x 3 root root 4096 Feb 7 15:37 ..
drwxr-xr-x 4 myuser myuser 4096 Feb 7 17:21 projects
drwxr-xr-x 4 myuser myuser 4096 Feb 9 10:21 public_html
and for the purposes of testing both directories contain an index.html file with the same 755 permission.
When I restart the httpd service I get:
[root@localhost conf]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Warning: DocumentRoot [/home/myuser/projects] does not exist
[ OK ]
My vhosts file contains:
options Indexes Includes FollowSymLinks
Allow from all
I only have one vhosts file at the moment so for my test I change the DocumentRoot and Directory between projects and public_html, restarting httpd between each change.
Apache error log shows:
[Wed Feb 09 11:22:24 2011] [error] [client 172.16.55.1] (13)Permission denied: access to / denied
[Wed Feb 09 11:22:24 2011] [error] [client 172.16.55.1] (13)Permission denied: access to /favicon.ico denied
and I get a 403 in the web browser.
I am confused as to what is going on... Everything works if I set doc root and dir as /home/myuser/public_html, but not /home/myuser/projects