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

ASP.net MVC

How do I run multiple instances of the same application at the same time in different subdomains?

I have a dozen subdomains.

sub1.website.com sub2.website.com

and a folder structure like this

\ site \ sub1 \ site \ sub2

If I need to run the same application for all subdomains, what would be the best application?

Host is at root \ website \ and figuring out where to look based on "user"? (i think i need to implement logic in code)

OR

Just copy the application to each of the subdomains and ask the application not to know what is it actually an instance? (this would mean that when I update the application I have to copy it over)

What other approaches to this problem exist? Each application will use a different database name, so we will need to encode in some external file.

+2


a source to share


1 answer


If they use separate databases, it means that they are completely separate sites. The fact that they are the same codebase doesn't matter.

Expand each one to

/website/sub1
/website/sub2

      



Yes, when you release new code you will need to do this in every folder, but this is always a deployment issue, do not interfere with your code or use any foreign configuration to compensate.

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

0


a source







All Articles