I have a self compiled version of Apache 2 running under Mac OS X Leopard. It's a default install at /usr/local/apache2 and work fine.
Today I wanted to add a virtual host so I could access a particular folder with the domain name
So I added
127.0.0.1 binarytales.local to
/etc/hosts, fluch the dns cache and, yey, I could access my server via that address.
I wanted to be able to access, via my newly created local domain name, a subfolder in in my working web server. So I set up the following vhosts file
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /usr/local/apache2/htdocs ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot /usr/local/apache2/htdocs/ProjectX ServerName binarytales.local </VirtualHost>
localhost works fine, I get the files I always used to get. Browsing to
binarytales.local gives me an internal server error.
I did a bit of investgating and discovered that I had set htdocs to be a symlink to
/Users/me/Sites so I tried setting my vhost to
<VirtualHost *:80> DocumentRoot /Users/me/Sites/ProjectX ServerName binarytales.local </VirtualHost>
This didn't work either. Now I'm getting
Forbidden You don't have permission to access / on this server.
So I tried
DocumentRoot /Users/me/Sites and got the same forbidden message.
Finally I have tried
DocumentRoot /usr/local/apache2/htdocs2 ServerName binarytales.local
/usr/local/apache2/htdocs2 is a symlink to
Users/me/Sites/ProjectX. And I also tried it with
Users/me/Sites. I'm getting the same "Forbidden" error.
I have checked the user and group settings on everything is root/wheel apart from the stuff in `Users/me/Sites/' which is me/wheel. All the directors are chmod -x for everyone.
I'm totally stuck and don't have a clue what to try next!
My question title is crap. Please do change it to/suggest something better.