Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure CDN endpoint giving 502 bad gateway with https

Tags:

c#

.net

http

cdn

azure

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.

like image 696
MoXplod Avatar asked Jun 19 '26 13:06

MoXplod


1 Answers

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

like image 122
subhash singh Avatar answered Jun 21 '26 02:06

subhash singh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!