Azure load balancer does not forward HTTPS requests to Servers

azureload balancing

I have 2 VMs behind a load balancer on Azure. I have enabled HTTPS connection for the Websites i have deployed in those VMs using self signed ssl certificate. When I connect to that VM directly via IP I see the certificate loaded, but when i try to connect through load balancer over HTTPS, I get a page which specified "Your connection is not private" (as it is self signed certificate) and in Advanced i click on "proceed to site". For VMs it works, but when i use load balancer IP it will load the same page again and again specifying the same error. I couldn't find much material for implementing HTTPS as well. i implemented based on my understanding of Azure load balancer.

Also can i achieve HTTPS using load balancer or do i need to implement Application Gateway?

Privacy Error:

Error in Browser

Best Answer

You can use the Azure CLI to create an application gateway with a certificate for SSL termination that uses a virtual machine scale set for backend servers. In this example, the scale set contains two virtual machine instances that are added to the default backend pool of the application gateway.

https://docs.microsoft.com/en-us/azure/application-gateway/tutorial-ssl-cli