Got an SSL Cert from AWS EC2, enabled full SSL in Cloudflare, but https doesn't work

ssl

#1

ISSUE: ERROR 502
I launched an instance in Amazon EC2 and received a SSL cert, I added CNAMEs in Cloudflare and turned on https redirection.
And I have done the following:

  • Amazon security groups added HTTPS port(443)
  • Added CNAME records in Cloudflare DNS
  • Pointed my domain www.xxx.com to Cloudflare, and it works with HTTP
  • This EC2 instance is running in Node.js Server

What I haven’t done are:

  • Launched EC2 Load Balancer
  • Install anything related to SSL in server(not knowing if it is necessary)

I am not sure if I have missed something in Cloudflare, or it’s the matter in Amazon EC2(sorry if I asked this bad question here in Cloudflare if so). Please is there any solutions for WITHOUT using ELB in AWS?


#2

Your origin server is refusing connections on port 443 in this instance. So either it needs to be configured ot use SSL or SSL on Cloudflare should be set to Flexible. Ideally you can configure the origin to listen on 443/ use SSL.


#3

I have changed my nodejs server listening on Port 443, thanks I think it works! But now I got ERROR 525,
though probably it’s the matter of EC2 not Cloudflare.


#4

Yes you’ll probably need some type of certificate on your origin, even if it is just self signed.