Search code examples
sslweb-applicationstls1.2sniazure-application-gateway

How to access a web application via (Server Name Indication) SNI?


I have a requirement to host multiple applications on same public IP and port. I'm new to this area and I figure out that SNI can be used to achieve my requirement. I decided to use Microsoft application gateway as the load balancer. I can configure 2 apps with 2 SSL certificates. My question is how can i access it via browser ? ex: if server FQDN is www.example.com, Since there are 2 applications running in it. how can I mention which application to load ?.


Solution

  • Each certificate needs to be associated with a specific FQDN for one application. Since you have 2 applications on the same IP and TCP port, you need to create two FQDN (i.e. www.my1stappli.mydomain.com and www.my2ndappli.mydomain.com), generate two certificates (one for each FQDN) and configure the Azure Application Gateway to handle each application with its own certificate. If you have only one virtual machine to handle those 2 applications, configure the Azure Application Gateway to redirect one application to port 80 of your virtual machine and to redirect the other application to port 81 of the same virtual machine.

    Thus,