How to set up a virtual host on OSX running apache.
sudo pico /etc/httpd/httpd.conf
Uncomment the line: NameVirtualHost 127.0.0.1:80 and then add a new virtual hosts directive:
<VirtualHost 127.0.0.1>
DocumentRoot /Users/Ben/Sites/project_directory
ServerName project_name
</VirtualHost>
sudo pico /etc/hosts
And add a line for your new virtual domain:
127.0.0.1 project
sudo apachectl restart
Virtual host should now be up and running.