-
-
Save praisegeek/b47b6d7cb9963d31c06cf2bb0eef159f to your computer and use it in GitHub Desktop.
Revisions
-
Eloy Pineda revised this gist
Jul 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,6 @@ $ sudo launchctl stop homebrew.mxcl.dnsmasq $ sudo launchctl start homebrew.mxcl.dnsmasq ``` - For OS X to _resolve_ requests from `*.local` to **localhost** we need to add a _resolver_: ``` $ sudo mkdir /etc/resolver $ sudo touch /etc/resolver/local @@ -28,6 +27,7 @@ $ sudo touch /etc/resolver/local ``` nameserver 127.0.0.1 ``` - re-start the computer to enable the _resolver_ === **REFERENCES** -
Eloy Pineda revised this gist
Jul 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ $ sudo brew services start dnsmasq $ sudo launchctl stop homebrew.mxcl.dnsmasq $ sudo launchctl start homebrew.mxcl.dnsmasq ``` - For OS X to _resolve_ requests from `*.local` to **localhost** we need to add a _resolver_: (re-start the computer to enable the _resolver_) ``` $ sudo mkdir /etc/resolver -
Eloy Pineda revised this gist
Jul 19, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ $ sudo launchctl stop homebrew.mxcl.dnsmasq $ sudo launchctl start homebrew.mxcl.dnsmasq ``` - For OS X to _resolve_ requests from `*.local` to **localhost** we need to add a _resolver_: (re-start the computer to enable the _resolver_) ``` $ sudo mkdir /etc/resolver $ sudo touch /etc/resolver/local -
Eloy Pineda created this gist
Jul 19, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ # wildcard DNS in localhost development - install [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) ``` $ brew install dnsmasq ... $ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf ``` - edit `/usr/local/etc/dnsmasq.conf` ``` address=/local/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 `*.local` to **localhost** we need to add a _resolver_: ``` $ sudo mkdir /etc/resolver $ sudo touch /etc/resolver/local ``` - edit `/etc/resolver/local` ``` nameserver 127.0.0.1 ``` === **REFERENCES** - [Using Dnsmasq for local development on OS X - Passing Curiosity](https://passingcuriosity.com/2013/dnsmasq-dev-osx/) - [Using Dnsmasq Configure Wildcard DNS Record on Mac | Ri Xu Online](https://xuri.me/2014/12/13/using-dnsmasq-configure-wildcard-dns-record-on-mac.html) - [unix - In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain? - Server Fault](http://serverfault.com/questions/118378/in-my-etc-hosts-file-on-linux-osx-how-do-i-do-a-wildcard-subdomain) - [hostname - Wildcard in /etc/hosts file - Unix & Linux Stack Exchange](http://unix.stackexchange.com/questions/3352/wildcard-in-etc-hosts-file) - [Mac OS Lion - Wildcard subdomain virtual host - Stack Overflow](http://stackoverflow.com/questions/9562059/mac-os-lion-wildcard-subdomain-virtual-host) - [How to put wildcard entry into /etc/hosts? - Stack Overflow](http://stackoverflow.com/questions/20446930/how-to-put-wildcard-entry-into-etc-hosts)