Suddely 522 error when requesting via https

*Hi, i’ve been using Cloudflare for almost 6 months. I have nginx running on my server, and port 80 forwarded to my public ip. Nginx is listening to that port. The problem is that everything was working fine, and suddenly 2 days ago people started getting 522 error when connecting to my subdomain.
I’ve found out that it is only happening when the A record of the subdomain is pointing to my public ipv4, other ip addresses seem to be working fine. The nginx log on my server says that it contacted the nginx server, but i still get the 522 error. Also, when i tried to connect to that subdomain from another pc on another public ip, it connected only to http, and only https requests were getting 522 error.
My friend told me that there may be a problem with SSL/TLS on my Cloudflare dashboard. When i looked at the ssl encryption mode in my Cloudflare dashboard, it was saying that it was changed 2 days ago, which is also about that time it stopped working. I did not change that setting, but i gave access to my account to Ezoic ads manager about a week ago.
Firewalls seem to be working fine too, i have also tried to restart my routers and the server, and pointing another Cloudflare domain to my ip but no luck.
Even weirder is that a minecraft server that points also to my public ip is working fine, it is set to another subdomain.
Is there anything i can do with it? Thanks

hey, is anyone there?

What you wrote suggests your server is not configured for SSL and that will be the issue here.

Pause Cloudflare and talk to your host to make sure your server is properly configured and your site loads fine on HTTPS. Once it does, it should also work on Cloudflare.

But,… it has been working fine for almost 5 months with the nginx configuration i still have to this day, and suddenly one day when i was not touching anything in my configuration it stopped working and started showing the 522…?

You did not pause your domain yet and the configuration you posted does suggest a non-HTTPS setup.

That does not answer my question how was it possible that it worked with https just fine for 5 months WITH THIS CONFIGURATION and then suddenly it stopped working and just throws 522 error on https…? Thanks

It’s a bit difficult if you are not following advice. Nobody can tell you why your server worked for five months and now doesn’t any more.

As I wrote already twice, pause Cloudflare.

Sorry for my misuderstanding, i’ll try to do it. Thank you for your advice

No worries, once it’s paused we should have more details.

Noticed you paused it and yes, I am afraid the issue is that your server is not responding.

As I mentioned, you should talk to your host to get that working on SSL. Once it does it will work.

Ok, so i installed the cetrificate and key i generated on my Cloudflare dashboard on my nginx server, but now i get a new error. What could it mean?

I am afraid your server still does not respond properly.

Maybe your local firewall.

Do not unpause Cloudflare until it actually loads fine.

hmm, but the port 443 and 80 both seem to be open, so are on my server’s firewall


Port forwarding might be there, but the server does not respond.

Until it’s not green here (when not proxied), it won’t work.

I’ll try to ask my isp, thank you for your time

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.