Properly Configuring CloudFlare

I think that 502 error means your server was unable to validate Cloudflare’s client certificate. I think that means your server failed to read the SSLCACertificateFile.

First, make sure the path you specified is correct. In your explanation you have a capital C on Cloudflare but in your config it’s lowercase. Unix filesystems are case-sensitive so make sure that matches, and otherwise that the path is right.

If the path is right–did you do a full restart of Apache or just a config reload? Apache sometimes needs a full restart to pick up a new certificate.

Finally, and probably the correct answer, for the config you pasted in, what context is it in, in your httpd.conf? The SSLCACertificateFile directive must be either in the top-level server config, or at the top level of a virtual host config. It cannot be in a <Directory> or <Location> or in an .htaccess file.

1 Like