开发者

ASP.net MVC How to run multiple instances of the same app at the same time in different subdomains?

ASP.net MVC

How to run multiple instances of the same app at the same time in different subdomains?

I have a dozen or so subdomains.

sub1.website.com sub2.website.com

and the folder structure like this

\website\sub1 \website\sub2

If i need to run the same app for all of the subdomains, what would be the best appoach?

Host is in the root \website\ and have it figure out where to look based on the "user"? (i imagine i need to implement de logic in the code)

OR

Just copy the app in each of the subdomains, and have the app "not knowing" that it is actually an instance? (this would mean that when i update the app, i have to copy it everywhere)

What other approaches are 开发者_如何学Gothere to this kind of issue? Each app will use a different database name so that will need to we coded in somekind of external file.


If they use separate databases, this implies to me that they are completely separate sites. The fact that they are the same codebase is irrelevant.

Deploy each one to

/website/sub1
/website/sub2

Yes, when you release new code you will need to do it to each folder, but this is always a deployment problem, dont mangle your code or have some external config to compensate.

Write a deployment script in ruby/powershell/whatever if its a major headache

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜