1

Amazon's Cloudfront CDN requires correct connection to your origin in order to work properly without any 502 bad gateway error.

I did setup everything alright.

For example: Cloudfront URL: https://d1u2h2xwg5v1gz.cloudfront.net/wp-content/uploads/2018/11/smartphone-security-guide-1.jpeg (502 Error) My origin URL: https://www.techlegends.in/wp-content/uploads/2018/11/smartphone-security-guide-1.jpeg (Origin)

As per the SSL test (in reference to this guide: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html) - the origin name does satify the condition.

  • Is there anything in your origin server's log files? – Stephen Ostermiller Nov 29 '18 at 10:51
  • Let me check that out. – ankush Nov 29 '18 at 11:12
  • Nope, there's nothing weird in my origin server's log files. Everything's good. You can run a check on my domain using any tool - you'll find all the SSL certificates/protocols and ports are working. Port 80 forwarding requests to HTTPS is also there - so there's nothing that is blocking or rejecting Cloudfront's CDN. – ankush Nov 29 '18 at 11:18
  • Any correlation of not loading with image size? – Stephen Ostermiller Nov 29 '18 at 11:42
  • I don’t think so. I’ll try to forcefully purge the cache of the CDN and see whether it’s just for images or every asset on my domain. Will keep this thread updated, thanks for your time! – ankush Nov 29 '18 at 11:50

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.