Rails 3 中的子域 [英] Subdomaining in rails 3

查看:29
本文介绍了Rails 3 中的子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用商店项目.用户可以订阅许多应用程序.我正在为每个用户创建一个子域,他订阅的应用程序再次在子域上运行.

I am working on a project which is a app store. User can subscribe to many applications. I am creating a subdomain for each user and applications he subscribed are again running on subdomains.

例如.

1). One user registers and selects subdomain as "mysubdomain". Then after logging in he will be accessing everything as "mysubdomain.appstore.com". 

2). After registration he subscribes an app, say, "discussion-board". 

3). Then the discussion board will be running on "discussion-board.mysubdomain.appstore.com"

允许在 app_store.com 上运行的用户的应用程序和实用程序应用讨论板是两个不同的应用程序.

Application which allows user which is running on app_store.com and the utility app discussion-board are two different applications.

我知道这个问题听起来更像是 serverfault.com,但如果它可以使用 Rails 进行管理,我就把它放在这里.我正在使用设计在 rails 3 上进行身份验证

I know the question sounds more like serverfault.com, but I am putting it here if it can be managed using rails. I am using devise for authentication on rails 3

推荐答案

我建议您查看:

http://railscasts.com/episodes/221-subdomains-in-rails-3

看看将单独的应用程序作为 Rack 中间件.

And take a look at doing the separate apps as Rack middleware.

这篇关于Rails 3 中的子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆