开发者

Subdomain Setup for IIS pointing to the same web application

We have a web application which must be deployed as independent subdomains to the url http://clientName.webapp.com. Each client can choose a site name, but the web application are all the same. We are currently running .NET 2.0 moving to 3.5 on iis7, and servers are load balenced with inproc session management done on a shared server. It is also required that this is a real-time s开发者_如何学运维eteup where clients sign up and can start using the webapp. It is also required that particular client sites have SSL encryption independently.

So question is, should I use url write to accomplish this? If so, how do I setup SSL encryptions independently? Or should I create a new website pointing to the same app? if so, how do I script this so it is created automatically.

thanks for all the help!


With this I will make a couple of assumptions:

a) All sub-domains are pointing to the same code on the file system (same document root)

b) All sites will be running under the same webapp.com domain (i.e. app1.webapp.com, app2.webapp.com, etc.)

Here is one possible way to accomplish what you are trying to do.

  • Create a single IIS website that responds to the exact IP address you have been given to use (might be best not to use the "All Unassigned"). No host headers should need to be used.
  • Setup a wildcard DNS record for the webapp.com domain that resolves to the IP address of your web application. That way, if any request comes in for any sub-domain that does not already have an explicit DNS record created it will be routed to your application.
  • Get a wildcard SSL certificate for *.webapp.com. The wildcard SSL certificate will cover any and all sub-domains that are created for your application. Otherwise, you will end up having to purchase multiple SSL certificates and may have to create multiple IIS websites.
  • Within your application, you will need to take into account and special processing based on the subdomain (i.e. which users should have access, what content to display, etc.).

This is actually a similar idea to how WordPress Multi-site works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜