now when I point a browser at domain1.com, I see this:
Forbidden You don't have permission to access / on this server.
instead, if I change my VirtualHost to point to this:
then I see the PHP page I dropped there while I was setting up Apache.
So my question is: do my Virtual Host sites all need to be in a directory beneath the DocumentRoot specified in httpd.conf? (/var/www/html/)
If so, then I have a lot of reorganizing to do :(
I thought I was being smart by putting my sites into distinct folders. On my previous host (using add-on domains in CPANEL) I was often annoyed that my sites were often accessible via subfolders and subdomains of the root domain, like http://mypersonaldomain.com/anothersite/index.php and http://anothersite.mypersonaldomain.com/index.php and I had to do some tedious shenanigans with .htaccess to prevent that
most of the other servers I've ever dealt with had that same configuration. Maybe I'm wrong for trying to reinvent the wheel?
Msg#: 4250882 posted 3:28 am on Jan 9, 2011 (gmt 0)
There's nothing wrong with your setup, just that you have probably not altered your httpd.conf to give Apache access to /home.
From memory (can't easily check the specifics at the time of posting), you will have have an entry for <Directory /> which will have a "Deny from all", then another for <Directory "/var/www/htdocs"> which will open things up a bit just for access to files within the specified document root. You just need to add a similar entry for your paths.
Alternatively you can separate out sites with one Unix login per site and use UserDir public_html (old-skool shared hosting style), then set the Virtual Hosts accordingly: