4 ms·
I'll recommend using dnsmasq plus some local resolver configuration to set up your own host-local magic domain, eliminating the need for reliance on a third-par
by saidajigumi 12y ago
I'll recommend using dnsmasq plus some local resolver configuration to set up your own host-local magic domain, eliminating the need for reliance on a third-party magic domain.
Pow[1] by the Basecamp folks provides a nicely packaged version of dnsmasq tooling for Rack & Rails apps. See also, the guard-pow and powder gems which make using Pow even nicer.
For other cases (and the DIYers among us) Thomas Sutton wrote up instructions for setting up dnsmasq[2] on OS X for app development. IIRC, the dnsmasq setup should be identical on other *nix flavors. Your local resolver configuration may vary, but this guide will get you pointed the right direction. I highly recommend reading [2] even just as a guide to understand/demystify what Pow does under the hood.
The dnsmasq setup can also be used for tools like Dokku[3], a Heroku-style service you can run in (e.g.) a local VM.
[1] http://pow.cx/ http://pow.cx/
[2] http://passingcuriosity.com/2013/dnsmasq-dev-osx/ http://passingcuriosity.com/2013/dnsmasq-dev-osx/
[3] https://github.com/progrium/dokku https://github.com/progrium/dokku
- scott_karana 12y agoI love Pow, but I really, really wish they'd change their default tld from .dev to .local. The .dev TLD might end up existing soon[1], whereas .local is reserved and will never exist on root nameservers[2]. So eventually, developers using Pow might have conflicts between their local-only dev sites and real websites. Bad mojo. 1 http://icannwiki.com/.dev http://icannwiki.com/.dev 2 http://en.wikipedia.org/wiki/.local http://en.wikipedia.org/wiki/.local
- saidajigumi 12y agoThat won't work if you're using mDNS on the local network, as the dnsmasq resolution will hijack all queries to .local. Really, there just needs to be a small set of reserved TLDs. This includes one for which queries should never* be issued off a given host. .local (== 127.0.0.1) would have been ideal, but zeroconf slurped it up first. I'd put my vote in for .dev, but the Wikipedia link indicates that Google's looking to score it. :-P
- scott_karana 12y agoI guess .localhost (already reserved for exactly that purpose) would work then. :)