用dnsmasq设置本地开发dev环境
作弊条一个,主要是为了映射多个项目的.dev泛域名解析到localhost
brew install dnsmasq
cat << EOF > /usr/local/etc/dnsmasq.conf
address=/.dev/127.0.0.1
listen-address=127.0.0.1
port=35353
EOF
sudo mkdir /etc/resolver
sudo chown `whoami`:admin /etc/resolver
cat << EOF > /etc/resolver/dev
nameserver 127.0.0.1
port 35353
EOF
使用了brew services
的话还可以直接brew services start dnsmasq
就启动了
Last modified on 2015-10-05