I’ve configured a local DNS server that makes it a little bit easier to develop locally, because i always work with local domains like e.g. project.local.dev i always had to add them to my host file, and that’s very annoying. I stumbled upon the little app DNS Enabler and it saves me allot of trouble installing a local DNS server, and it saves me allot of time! It costs 15 dollar but worth every penny. Whenever i add something in my addressbar, like blabla.local.dev it automatticly goes to a local folder on /data/www/blabla. This is how i did it:

I assume you already have apache installed, if not, you can follow my tutorial on that too. Open up your apache config, usually found in /private/etc/apache2/

Add the following:

Click here for the vhost config, my code syntax highlighter messes it up :(

Next thing up is, install DNS Enabler (buy if first ofcourse) and copy these settings:

dns-enabler

(click image to enlarge)

And make sure you set the DNS in your system preferences to localhost, e.g.:

picture-2

Thats all! Now you can add a directory in your root e.g. /data/www/test and go to it in your browser with http://test.local.dev