3
votes

I just setup azure CDN endpoint. Pointed to my origin server. This works with http protocol. But the same files when i try https - it returns a 502 - bad gateway error. How do i troubleshoot and fix the problem?

A very similar setup works perfectly on another endpoint with HTTPs.

1

1 Answers

0
votes

I think you may need to do is to serve your CDN assets over HTTPS. To do this you'll need to enable HTTPS within the Azure Portal

if still not then:

You can't yet use your own domain/SSL certificate with Azure CDN although there is a big request for this on the Azure Feedback Site.

If you've created a CDN for an Azure Cloud Service (e.g. http://[yourapp].cloudapp.net/cdn/) it's important that you create a self-signed certificate for your Azure domain ([yourapp].cloudapp.net). If you're using Azure Virtual Machines this can be done through IIS.

This caught us out recently when we enabled HTTPS for an origin server that did have an SSL certificate but it was for our own custom domain and not the *.cloudapp.net one.

for details click on http://benfoster.io/blog/azure-cdn-https