none
Azure CDN endpoint giving 502 bad gateway with https RRS feed

  • Question

  • 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.

    I am serving my assets over HTTPS. I am using virtual machine and i have iis setup so i can access all my assets and url over HTTPS. But i dont get it. I have a site which works with azure cdn origin url pointed tobeta.exampledomain.com but another subdomain does not work app.exampledomain.com Both are serving https content properly when you hit them directly.


    • Edited by Moxplod1 Tuesday, August 4, 2015 4:37 AM
    Tuesday, August 4, 2015 4:37 AM

Answers

  • To provide guidance we would need to have a sample URL from the CDN that is exhibiting this issue along with the HTTP response headers that are associated with the 502 error. A 502 Bad Gateway response code occurs when an HTTP protocol failure occurs between a server and an HTTP proxy. In the case of Azure CDN, a 502 Bad Gateway response code typically occurs when the origin server returns an invalid response to a CDN edge server. A response is invalid if it cannot be parsed or if it is incomplete.
    Monday, August 10, 2015 8:46 PM

All replies

  • To provide guidance we would need to have a sample URL from the CDN that is exhibiting this issue along with the HTTP response headers that are associated with the 502 error. A 502 Bad Gateway response code occurs when an HTTP protocol failure occurs between a server and an HTTP proxy. In the case of Azure CDN, a 502 Bad Gateway response code typically occurs when the origin server returns an invalid response to a CDN edge server. A response is invalid if it cannot be parsed or if it is incomplete.
    Monday, August 10, 2015 8:46 PM
  • I have been having similar issues with the CDN that seems to be a limitation for the product.

    I receive a "502 - Bad Gateway" when I access an image using issuing a HTTPS request to my custom origin path. According to the link below, custom origin endpoints do not support HTTPS at this point.

    https://azure.microsoft.com/en-us/documentation/articles/cdn-how-to-use-cdn/#accessing-cached-content-over-https

    Is this something that is in the pipeline to be added? Or is there a way I could fetch an image via HTTP and have Azure CDN serve it over a HTTPS connection?



    • Edited by purpl3p3rs0n Saturday, April 9, 2016 8:59 PM Don't want URL to visible long
    Thursday, April 7, 2016 2:03 PM
  • HTTPS is supported for custom origin endpoints. What is not supported today is the ability to use HTTPS with a custom domain. This is on our roadmap to provide in Q2 of this year. Your HTTPS URL should be working we are following up on why there is an issue here.
    Thursday, April 7, 2016 10:28 PM
  • Hi, can you verify whether SNI is turned on at your origin? This could possibly be causing the problem as the CDN is not setup for this currently.

    Friday, April 8, 2016 6:29 PM
  • Hi Richard!. I double checked and I have SNI setup for the SSL binding. It's running on a Azure VM but rDNS entry is for a separate hosted domain. Not sure if that would cause issues...but that's all I can think of.

    Friday, April 8, 2016 8:50 PM
  • We have confirmed that HTTPS via SNI is the reason you are seeing this issue. If you turn off SNI setup for SSL binding this would resolve the issue you are seeing. Is this a change you are able to make?
    Saturday, April 9, 2016 12:54 AM
  • Ah that did it! Thanks so much!
    Saturday, April 9, 2016 8:58 PM