TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Smack a Ho.st - A localhost domain

36 点作者 vijaydev大约 15 年前

8 条评论

fizx大约 15 年前
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 未加载
anotherjesse大约 15 年前
I also wildcard *.localhacks.com to 127.0.0.1
olefoo大约 15 年前
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 未加载
generalk大约 15 年前
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.
Erwin大约 15 年前
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 未加载
mikexstudios大约 15 年前
*.somesite.com has been around since 2003 and points to 127.0.0.1.
volomike大约 15 年前
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 未加载
blasdel大约 15 年前
There's already a totally unambiguous domain for this -- why not alias *.localhost?