Created
November 16, 2013 00:32
-
-
Save Swop/7494182 to your computer and use it in GitHub Desktop.
Simplify Local Development with Dnsmasq on MacOS X (credits: http://blakeembrey.com/articles/local-development-with-dnsmasq/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install homebrew first... | |
# Then: | |
brew install dnsmasq | |
cp /usr/local/Cellar/dnsmasq/X.XX/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf | |
sudo cp /usr/local/Cellar/dnsmasq/X.XX/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
# Edit /usr/local/etc/dnsmasq.conf to add custom TLD (here: *.dev): | |
echo "address=/dev/127.0.0.1" >> /usr/local/etc/dnsmasq.conf | |
# Restart dnsmasq | |
sudo launchctl stop homebrew.mxcl.dnsmasq && sudo launchctl start homebrew.mxcl.dnsmasq | |
# And don't forget to add the DNS server in your network configuration (System Preferences -> Network -> Advanced -> DNS) to 127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment