by Paul Kukiel

I wiped my Old(ish) Macbook and upgraded to Snow Leopard this gave my Core Duo 1.8ghz 2g ram macbook a lease of new life. I needed to re-setup my local dev enviroment and noticed a few people where unsure how to setup vhosts with apache default install with OSX 10.6/10.5/10.4 so here it is step by step.Edit the hosts file to add a local DNS entry.Add the domain name you wish to use 127.0.0.1 is the loopback IP do not change this IP.Create the folders and files for the local website. I chose to place the log files for apache in the site folder and the website content under a sub folder www.Edit httpd.conf I used path finder here to show the locations.You can also use VI or any text editorOn line 465 uncomment: Include /private/etc/apache2/extra/httpd-vhosts.conf and save the file.Edit: /etc/apache2/extra/httpd-vhosts.confAdd in the details of the new virtual host and save:( I'm running Railo on Tomcat locally so I have so additional parameters )I also set my logging levels to log as much as possible.Notice the location of the logs files matched the access.log and error.log files created earlierRun: apachectl -tto confirm there are no syntax errors.I choose to leave the example sites, they cause a warning but it wont stop apache.Then restart apache: sudo apachectl restartCreate a test file in the new folder for the virtual host ( /Users/Paul/Sites/paulsDev/www )Confirm the new virtual host works:If you'd like to watch the logs in a terminal you can use tail:tail -f /the/Path/to/the/log/fileBTW Dave made a great How-to on setting up Tomcat and Railo on OSX which you can view here.