I setup a proxied DNS entry for one of my domains pointing to my webservice. The webservice is availabe but Cloudflare always fails with a 522 error.
What steps have you taken to resolve the issue?
I verified the DNS and IP settings, verified proxy on the firewall.
I tested manually via cURL to verify the firewall and the underlying webservice are setup correctly. This has been done via cURL:
curl -k --resolve host.my-domain.my:443:75.6.34.123 https://host.my-domain.my
Therefore I can verify that the proxy is listening on this ip adress and the proxy configuration is correct because it forwards the request and replies with the html login page.
Regarding 522 error, what steps for troubleshooting have you tried already?
Is Cloudflare allowed to connect to your host?
May I ask if your sub-domain is configured and listening on an HTTP(S) port on your which is supported and compatible with Cloudflare proxy on your origin web server?
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?
Before moving to Cloudflare, was your Website working over HTTPS connection?
Steps for troubleshooting:
Use the “Pause Cloudflare on Site” option from the Overview tab for your domain at dash.cloudflare.com .
The link is in the lower right corner of that page.
Give it five minutes to take effect, then make sure site is working as expected with HTTPS without any error
Check with your hosting provider / Plesk panel / cPanel AutoSSL / Let’s Encrypt / ACME / Certbot and manually click to renew it
Only then, when your website responds over HTTPS, you should un-pause Cloudflare and double-check your SSL/TLS setting to make sure it’s set to Full (Strict).