[Solved] Error 520 and client auth

I have create a subdomain for my database server. In local network, it works perfectly. However, when enabled cloudflare, I got error 520. Does anyone know how to fix it?

PS: I think this problem is related to client authentication since I have enabled the client authentication using my self sign certificate. Maybe because of this, the cloudflare don’t have the client certificate so unable to communicate with my server?

Server Environment:
Windows 10 21H1 using xampp

Are you trying to protect your database server with Cloudflare?

Cloudflare only protects HTTP and HTTPS with few supported ports, services other than HTTP and HTTPS are not supported.

Cloudflare Spectrum might be an option to protect other ports using Cloudflare, but it’s only available for Enterprise customers.

Thank you for your reply.
Basically, the contents of the website is related to database. However, since I am using Xampp, which has apache and mysql. Therefore, it use https website to access the mysql database.

I figure out that the problem is because of the client authentication certificate.

When I disabled client authentication, it works with cloudflare.

However, when I enabled client authentication in apache setting, it show me error 520. Do you know is it possible to use cloudflare with client authentication function?

There’s an option called Authenticated Origin Pull:


Thank you. I think that’s the problem.

One more question, since my client authentication certificate is generated by me using my self signed CA. Is it possible to use it? Or need to use the certificate generated in cloudflare?

I found that it can upload the certificate but I think the command is linux. Is it possible to use Windows to upload it?

With slight modifications on the command, I think it can work on Windows, though I never try that before.

You just need to remove the newlines and and generate the JSON request body to be sent to Cloudflare.

1 Like

Ok, thank you so much for your help

1 Like

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