Dnsmasq For Local Development Site

Found via HN. I've used to edit /etc/hosts file and add local testing site manually and it never occurs to me to use Dnsmasq to redirect all URLs that ends with .dev to

Setup steps for Ubuntu as follows:
$ sudo apt-get install dnsmasq
$ echo 'address=/dev/' | sudo tee /etc/dnsmasq.d/localhost.dev
$ sudo sed -i '1inameserver' /etc/resolv.conf
$ sudo service dnsmasq restart
$ dig foobar.dev @| grep IN
$ ping foobar.dev

Simple yet smart way to use Dnsmasq.

No comments:

Post a Comment