Getting 502 error after switiching to SSL using origin cert


Since switching I get a 502 error even if I connect to http or https, I tried turning off SSL on cloudflares end and the error remained so it’s not that. I am running nginx on ubuntu.

Part of my nginx config that I changed for SSL:
image is the URL.


Right now I get a 400

Via HTTPS it runs into a timeout


Oh yeah sorry, it returns 502 when you attempt to connect via https. Any idea why?


Presumably the TLS configuration on your server is not working.


Your origin server is not listening on port 443.

telnet your.origin.ip.address 443
  Trying your.origin.ip.address. ... 

telnet: connect to address your.origin.ip.address: Operation timed out
telnet: Unable to connect to remote host


Hm… But on my server block (shown in post) it seems to be setup correctly for port 443 or am I doing something wrong?


It’s quite possible you have a firewall on your server that doesn’t have Port 443 open yet.

EDIT: Try this command: netstat --listen
and look for https entries.


Thanks, I got 2 https entries.


Update: allowed port 433 and it worked, thank you.


Then there’s most likely a firewall set up. Which Linux distribution are you using? It’s also possible your host provider has a firewall setting as well.


OVH with Ubuntu


See if you get anything from this firewall port listing:
ufw status

If that doesn’t work, or it does show Port 443 is open, then open a support ticket with OVH and refer them to @cscharff’s telnet test:


It’s alright I got it working by opening the port.

closed #14

This topic was automatically closed after 14 days. New replies are no longer allowed.