httpwebwitch - 3:11 am on Jan 9, 2011 (gmt 0)
As I set up my new server, I've created a user home directory: /home/me/sites/
under that I've created folders for each of my sites:
and in each of those, a public_html folder to hold their stuff:
And in there, I've put a little index.php action.
Now, I've created my first VirtualHost entry:
ServerAlias domain1.com *.domain1.com
The DNS for the domain is already set up properly
now when I point a browser at domain1.com, I see this:
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
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?