Reputation: 347
Given these premises, in the EC2 instance there is not a landing html page (like hello world!) to be reached if the CloudFront Distribution domain name or the domain name is pinged.
However, If I ping it, I get the 502 error (502 ERROR The request could not be satisfied. CloudFront wasn't able to connect to the origin. We can't connect to the server for this app or website at this time).
The domain was validated in the SSLlab without throwing errors except a "Chain issues Incorrect order, Extra certs" in the "Additional Certificates section" (not in the "Server Key and Certificate #1") and the X-Cache says: Error from CloudFront.
How can I fix the 502 error?
EDIT
I've posted the solution in the comment
Upvotes: 1
Views: 1482
Reputation: 919
In my case, you MUST use fullchain.pem certificate instead of the shorter cert.pem one. Otherwise cloudfront will fail to load non /
url if it is a single page app.
Upvotes: 0
Reputation: 347
The solution was to keep everything as above stated but:
At the end the issue was a conflict between the two ssl certificates. Only one had to be kept.
Upvotes: 1