Skip to content

Latest commit

 

History

History
40 lines (38 loc) · 1.69 KB

dns_masq_setup_osx.md

File metadata and controls

40 lines (38 loc) · 1.69 KB

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/dev/127.0.0.1
  • start dnsmasq
$ sudo brew services start dnsmasq
  • any time we change dnsmasq.conf we have to re-start dnsmasq:
$ sudo launchctl stop homebrew.mxcl.dnsmasq
$ sudo launchctl start homebrew.mxcl.dnsmasq
  • For OS X to resolve requests from *.dev to localhost we need to add a resolver:
$ sudo mkdir /etc/resolver
$ sudo touch /etc/resolver/dev
  • edit /etc/resolver/dev
nameserver 127.0.0.1
  • re-start the computer to enable the resolver

=== REFERENCES