My /etc/hosts has: 127.0.0.1 me So I can do http://me/website-to-test/
But if you are developing a site that uses the subdomain as a routing rule, that fails. Your /etc/hosts entry won't make http://fuck.me/ go to your site, which is what smackaho.st will allow you to do. Obviously this is easy enough to fake without DNS trickery; just modify the outgoing "Host:" header or teach your proxy how to "resolve" names in the form of "*.me".
Smack a Ho.st - A localhost domain
11–19 of 19 posts
Re: Smack a Ho.st - A localhost domain
#12The nice thing about this, for all of you people who understandably don't get it, is that setting up wildcard dns on OS X is a royal PITA. You can't just modify /etc/hosts, you have to http://www.macosxhints.com/article.php?story=200511022035208... Given all rails developers use a Mac ;) this is useful.
Re: Smack a Ho.st - A localhost domain
#13Do you need subdomains specificially, or just different addresses that resolve to localhost? If so you could use e.g http://127.1:3000/ , http://127.2:3000/ etc. (or the full 127.0.0.1 127.0.0.2 if your browser doesn't like 127.1).
Re: Smack a Ho.st - A localhost domain
#14Earlier quoted context omitted.
But if you are developing a site that uses the subdomain as a routing rule, that fails. Your /etc/hosts entry won't make http://fuck.me/ go to your site, which is what smackaho.st will allow you to do. Obviously this is easy enough to fake without DNS trickery; just modify the outgoing "Host:" header or teach your proxy how to "resolve" names in the form of "*.me".
Please don't - .me is a popular TLD.
Re: Smack a Ho.st - A localhost domain
#15The nice thing about this, for all of you people who understandably don't get it, is that setting up wildcard dns on OS X is a royal PITA. You can't just modify /etc/hosts, you have to http://www.macosxhints.com/article.php?story=200511022035208... Given all rails developers use a Mac ;) this is useful.
Hm, I modify my /etc/hosts all the time and it works as it should.
Re: Smack a Ho.st - A localhost domain
#16Re: Smack a Ho.st - A localhost domain
#17If there's a similar tool for non-MacOS or non-Rack stuff I'd love to hear about it.
Re: Smack a Ho.st - A localhost domain
#18Re: Smack a Ho.st - A localhost domain
#19Do you need subdomains specificially, or just different addresses that resolve to localhost? If so you could use e.g http://127.1:3000/ , http://127.2:3000/ etc. (or the full 127.0.0.1 127.0.0.2 if your browser doesn't like 127.1).
While aliasing localhost takes about 30 seconds (on Linux, at least), this trick will make it a little easier for new contributers to get involved.