I have a CloudFront Distribution connected with a custom origin ELB (with EC2 instance). When executing a request curl https://xxx.cloudfront.net/atlassian-connect.json
a HTTP/1.1 502 Bad Gateway
response is returned.
HTTP/1.1 502 Bad Gateway
Content-Type: text/html
Content-Length: 587
Connection: keep-alive
Server: CloudFront
Date: Sun, 29 May 2016 14:32:18 GMT
Age: 23
X-Cache: Error from cloudfront
Via: 1.1 fb7ff691963d3e3600808dccbe4422d2.cloudfront.net (CloudFront)
X-Amz-Cf-Id: HymCU2TweM0e6O4bDhluvDOj0gd2BoAqCnDtVyTOZBz2wOIYHN-Qhg==
When sending a request (bypassing the CloudFront distribution) straight to the ELB I'm able to get the response that is expected:
curl -kv https://xxx.eu-central-1.elb.amazonaws.com/atlassian-connect.json
After trying to tweak some of the cloudfront distribution options I'm not able to get it to work.
-k
in your cURL command is concerning. Does it work without that? If your SSL isn't valid, CloudFront isn't going to connect.