不同的域指向同一个rails应用程序

发布于 2024-12-09 01:51:08 字数 351 浏览 1 评论 0原文

我正在创建一个 Rails 应用程序,用户将能够从他们的帐户创建和管理多个博客。该应用程序将托管在 www.mydomain.com 上,但我希望用户指定他们拥有的域,并能够将其指向他们创建的任何博客,以便他们可以让 www.usersite.com 指向 www.mydomain.com。 mydomain.com/user/:user_id/blog/:blog_id

这样看起来就像托管在他们的网站上,尽管

我一直在阅读一些帖子,也许 CNAME 是解决这个问题的方法,但我创建 Rails 应用程序还很陌生如果有人可以帮助我或为我指明正确的方向,我将不胜感激。

如果您需要我澄清任何事情,请告诉我,

提前致谢 丹尼

I'm creating a rails app where users will be able to create and manage multiple blogs from their accounts. The app will be hosted on www.mydomain.com but i want users to specify a domain they own and be able to point it to any of the blogs they've created so that they can have www.usersite.com point to www.mydomain.com/user/:user_id/blog/:blog_id

that way it looks like is being hosted on their site even though is not

i've been reading some post and maybe CNAME is the way to go for this, but i'm pretty new to creating rails apps and if anyone can help me or point me in the right direction i would appriciate it.

If you need me to clarify anything please let me know

Thanks in advace
danny

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坏尐絯 2024-12-16 01:51:08

据我了解,您的问题更多是关于 DNS 而不是 Rails。
我可以建议您使用 Bandcamp 作为实例。

有一些提示:

  1. 使用 CNAME(我非常确定没有其他选择)您应该为每个用户提供自己独特的子域,即您的情况下的 user.mydomain.com。快速谷歌搜索,我们发现 Rails 3 有一个解决方案 - http:// /bcardarella.com/post/716951242/custom-subdomains-in-rails-3

  2. 您应该向他们提供分步手册他们可以准确地修改其域 DNS 条目并添加 CNAME 记录。这取决于他们。您或您的应用程序无法做到这一点。同样,Bandcamp 是一个很好的例子 - http://bandcamp.com/faq_custom_domains

然后你就赢了。

As far as I understood your question is more about DNS rather than Rails.
I could suggest you Bandcamp as a live example.

There's some tips:

  1. Using CNAME (and I pretty much sure there's no other options) You should provide every user with his own unique subdomain i.e. user.mydomain.com in your case. Quick googling and we find out that there's a solution for Rails 3 — http://bcardarella.com/post/716951242/custom-subdomains-in-rails-3

  2. You should provide them with step-by-step manual how exactly they can modify their domain DNS entries and add CNAME record. It's up to them. You or Your app can't do it. Again, Bandcamp is a great example — http://bandcamp.com/faq_custom_domains

And then you win.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文