Multiple SSL certificates in one azure deployment

azure, hosting, iis-7, ssl, ssl-certificate

Solution

You can use multiple SSL certificates and add them all to the same endpoint by automating the process of installing the certificates on the machine and add HTTPS bindings to IIS.

IIS 8 (Windows Server 2012) supports SNI, which enables you to add a "hostheader" to the HTTPS binding.

I'm a Microsoft Technical Evangelist and I have posted a detailed explanation and a sample "plug & play" source-code at: http://www.vic.ms/microsoft/windows-azure/multiples-ssl-certificates-on-windows-azure-cloud-services/

Problem

I have a problem similar to (but not the same) as this: Azure web role - Multiple ssl certs pointing to a single endpoint My azure package contains multiple sites. Some of these sites are on domain abc and others are on domain def. I need to secure both domains with SSL but can't figure out how (if it's possible) to do this. Here's an example of my config: ``` <Sites> <Site name="sub1.abc" physicalDirectory="***"> <Bindings> <Binding name="HttpIn" endpointName="HttpIn" hostHeader="sub1-staging.abc.com" /> <Binding name="HttpsInABC" endpointName="HttpsInABC" hostHeader="sub1.abc.com" /> </Bindings> </Site> <Site name="sub1.def" physicalDirectory="***"> <Bindings> <Binding name="HttpIn" endpointName="HttpIn" hostHeader="sub1-staging.def.com" /> <Binding name="HttpsInDEF" endpointName="HttpsInDEF" hostHeader="sub1.def.com" /> </Bindings> </Site> </Sites> <Endpoints> <InputEndpoint name="HttpIn" protocol="http" port="80" /> <InputEndpoint name="HttpsInABC" protocol="https" port="443" certificate="abc" /> <InputEndpoint name="HttpsInDEF" protocol="https" port="443" certificate="def" /> </Endpoints> <Certificates> <Certificate name="abc" storeLocation="LocalMachine" storeName="My" /> <Certificate name="def" storeLocation="LocalMachine" storeName="My" /> </Certificates> ``` This configuration gives me the following error: The same local port '443' is assigned to endpoints HttpsInABC and HttpsInDEF in role ***. Any suggestions on how I can work around this without having to host them separately? Based on @JoelDSouza's answer: Will using different ports work for you What are the implications of SSL on ports 444/445/446 etc. in Windows Azure?

Original source

Related problems