I'm having issues trying to configure multiple listeners in an Azure Application Gateway that use the same certificate.
I have a backend web server configured with a website for www.example.com, bound to the host headers "www.example.com" and "example.com" over https and this works correctly.
I have a certificate uploaded to the web server with the subject/cn set to www.example.com and a subject alternate name of example.com. I've uploaded this certificate to the Azure Application Gateway.
I have an https listener configured for www.example.com set to forward traffic to the webserver at www.example.com and this is working correctly.
I have another https listener configured to forward traffic for example.com to example.com on the web server and this gives a 502 gateway error. The Backend Health probe reports a CN name mismatch with the certificate (which is reasonable). How do I get it to use the SAN name for exmaple.com?
Should I instead create a rule to redirect traffic from https://example.com to https://www.example.com?