Hosting many Azure SSL sites using a wildcard certificate with MVC

The following application is currently running on a Windows 2008 R2 server that I am trying to port to Azure:

Part 1

First, I have the following ASP.NET MVC site that routes clients based on the first part of the DNS name:

https://customer1.myAzureSite.com https://customer2.myAzureSite.com https://customer3.myAzureSite.com ... https://customerN.myAzureSite.com 

Part 2

Then I also have another IIS website which is used only for registration / registration

 https://enroll.myAzureSite.com 

Part 3

This application uses SOA, and there is another site for the business slot:

 https://BusinessLayer.myAzureSite.com 

Work done so far

I plan to use the "sites" tag in the configuration file to configure two sites. I plan to use the IIS host headers to catch the “registration” and “business layer” subdomains. I have a certificate with the following topic name *.myAzureSite.com

Question:

How to properly configure my deployment (from the Azure point of view) so that all host headers go to my MVC application, and only one goes to "enrollment" and the other goes to "businesslayer"

Question:

Will this work correctly over SSL?

What comparable configuration should be done?

+4
source share
2 answers

I'll start with the simple part, your SSL substitution certificate should be good for these sites. You just need to make sure that you add the https endpoint to your role and select the appropriate certificate.

From what I see, you will need three sites defined in the service definition. First, by default, your MVC site is used. Then one at a time for your business and site registration. A section of your sites might look something like this:

  <Sites> <Site name="Web"> <Bindings> <Binding name="mvchttp" endpointName="http" /> <Binding name="mvchttps" endpointName="https" /> </Bindings> </Site> <Site name="Enroll" physicalDirectory="\enroll..."> <Bindings> <Binding name="mvchttp" endpointName="http" hostHeader = "enroll.MyAzureSite.Com" /> <Binding name="mvchttps" endpointName="https" hostHeader = "enroll.MyAzureSite.Com" /> </Bindings> </Site> <Site name="BusinessLayer" physicalDirectory="\BusinessLayer..."> <Bindings> <Binding name="mvchttp" endpointName="http" hostHeader = "BusinessLayer.MyAzureSite.Com" /> <Binding name="mvchttps" endpointName="https" hostHeader = "BusinessLayer.MyAzureSite.Com" /> </Bindings> </Site> </Sites> 
+4
source

It's worth mentioning that deploying multiple sites for a web role has recently become much easier with Windows Azure Accelerator for web roles - more information at http://waawebroles.codeplex.com/

0
source

Source: https://habr.com/ru/post/1345233/


All Articles