This will allow any url having the non-existant TLD .dev
to resolve to your
locale machine.
$ brew update
$ brew install dnsmasq
# Follow the instructions...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
Somewhere in /usr/local/etc/dnsmasq.conf
add the following:
address=/dev/127.0.0.1
Dnsmasq should automatically reload the configuration when it changes.
- make sure you have a directory for additional dns resolvers
$ sudo mkdir -p /etc/resolver
- create the dev resolver
$ sudo sh -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'
OSX should automatically load the resolver.
ping this.is.a.test.server.dev
Sometimes after you install dnsmasq, you need to reboot.