This works for both Leopard (10.5) and Snow Leopard (10.6). There are a couple of things you need to do. First you need to make it so Apache will serve up web documents from your Sites folder. Next you need to set up virtual hosting. Here’s how to do both .
Go into the /etc/apache2/users directory & using sudo create a .conf file for your user account. If your username is geronimo, then enter this into geronimo.conf:
1 2 3 4 5 6
Now, in order to add virtual hosting. Lets assume you want to name your virtual host local.me, add this next:
1 2 3 4 5
Next, you’ll need to edit the /etc/hosts file and add this line:
Thats it. Just restart apache & you’re done. You’ll now be able to serve up web docs located in your Sites/local.me folder at http://local.me