TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Smack a Ho.st - A localhost domain

36 pointsby vijaydevover 15 years ago

8 comments

fizxover 15 years ago
The 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 <a href="http://www.macosxhints.com/article.php?story=2005110220352084" rel="nofollow">http://www.macosxhints.com/article.php?story=200511022035208...</a><p>Given all rails developers use a Mac ;) this is useful.
评论 #1169134 未加载
anotherjesseover 15 years ago
I also wildcard *.localhacks.com to 127.0.0.1
olefooover 15 years ago
Why is this specific to Rails?<p>The beauty of the web and of the internet protocols it's built on is that you can have multiple implementations that respond to the same interface. DNS doesn't care what language it's pointing to.
评论 #1169067 未加载
generalkover 15 years ago
If you're developing on Rack-based webapps on MacOS, check out <a href="http://github.com/alloy/passengerpane" rel="nofollow">http://github.com/alloy/passengerpane</a> -- it's a System Preferences panel to automatically sets up local DNS and Apache/Phusion Passenger vhosts for projects.<p>If there's a similar tool for non-MacOS or non-Rack stuff I'd love to hear about it.
Erwinover 15 years ago
Do you need subdomains specificially, or just different addresses that resolve to localhost? If so you could use e.g <a href="http://127.1:3000/" rel="nofollow">http://127.1:3000/</a>, <a href="http://127.2:3000/" rel="nofollow">http://127.2:3000/</a> etc. (or the full 127.0.0.1 127.0.0.2 if your browser doesn't like 127.1).
评论 #1168998 未加载
评论 #1169533 未加载
评论 #1169154 未加载
mikexstudiosover 15 years ago
*.somesite.com has been around since 2003 and points to 127.0.0.1.
volomikeover 15 years ago
My /etc/hosts has:<p>127.0.0.1 me<p>So I can do <a href="http://me/website-to-test/" rel="nofollow">http://me/website-to-test/</a>
评论 #1168962 未加载
blasdelover 15 years ago
There's already a totally unambiguous domain for this -- why not alias *.localhost?