Subdomaining in rails 3

笑着哭i 提交于 2020-01-03 02:47:05

问题


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.

Eg.

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"

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

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


回答1:


I'd recommend you review:

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

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



来源:https://stackoverflow.com/questions/4871766/subdomaining-in-rails-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!