I am trying to generate certificates from lets encrypt for kong. I am using acme plugin for the same and i am following https://docs.konghq.com/hub/kong-inc/acme/
Everything is working as expected but when i try the step
curl https://example.com -k (putting in my actual domain name)
The response i am getting is
<html> <head><title>521 Origin Down</title></head> <body bgcolor="white"> <center><h1>521 Origin Down</h1></center> <hr><center>cloudflare-nginx</center> </body> </html>
what could be wrong.
Additional Information: I am using an AWS ec2 instance for kong server and port 443, 8000, 80, 8001 is open.
Also, i have already created an A record for the domain in cloudflare.