Http works correctly, https does not work, error 502


#1

There is a problem, the site on the http protocol is working correctly, and when I want to go to https, I get an error 502.
Hosting support said that the problem is on the Cloudflare side, all entries are specified correctly
what to do?


#2

Might ask hosting support to check again. Your origin server doesn’t appear to be listening on port 443. I ran the commands below with your domain and real origin IP address and the first results in a connection refused while the second succeeds. The curl commands bypass Cloudflare to communicate directly with the origin server. You can try the commands below or you can gray cloud the record and you’ll probably see the same results.

curl --resolve example.com:443:[real origin IP redacted] https://example.com

curl --resolve example.com:80:[real origin IP redacted] http://example.com


#3

I was told on the hosting that port 443 is closed, I assume that somewhere in the cloudflare settings you need to disable the secure connection to the server, and then you will use port 80, how do I do this?


#4

Have you tried setting your SSL level to ‘Flexible’? That should do it.


#5

Put Flexibl, included “Always use HTTPS”, writes the page is not available
HTTP ERROR 500


#6

I faced same issue. Did you find the answer?


#7

Are you sure your origin server is listening on port 443? That have you tried so far?