Skip to content

Instantly share code, notes, and snippets.

@daothanh
Created December 17, 2018 07:08
Show Gist options
  • Save daothanh/f8a23b0a85befc77450ce40be0802b3b to your computer and use it in GitHub Desktop.
Save daothanh/f8a23b0a85befc77450ce40be0802b3b to your computer and use it in GitHub Desktop.
Setup all domains *.test point 127.0.0.1
# Setup all domains *.test point 127.0.0.1
brew install dnsmasq
mkdir -pv $(brew --prefix)/etc/
echo 'address=/.test/127.0.0.1' > $(brew --prefix)/etc/dnsmasq.conf
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment