I have an Azure VM behind an Azure Public Load Balancer. The VM is running a website. I can load the website in a browser over HTTP with no issues, but when I try HTTPS I get a 502 error.
I've got a load balancing rule set up to send 443 to the VM. I allow all connections on 443 via a Network Security Group. I've triple checked the config and been looking at this for hours, but can't make any progress.
One additional clue is that if I remote into the VM, set my DNS name to point to the internal IP of the VM (10.1.2.4 instead of pointing to the public IP of the load balancer), and load the site in a browser over HTTPS it works. I'm not sure what that means other than it seems my IIS config isn't the issue.
Any thoughts would be extremely appreciated, and I'm happy to provide more details. Thanks!
In my Azure Load Balancer when I deleted my HTTPS load balancing rule and instead added a NAT rule redirecting 443 traffic directly to one of my VMs then HTTPS worked perfectly. So it appears to be something specific to my config using HTTPS with a Load Balancing rule.