Configuring Cloudflare HTTPS with Auto-SSL issued to domain by cPanel

Hi,

Thank you for providing the guidelines.

First, I tried the following;

  1. Enabled AutoSSL certificate on cPanel.
  2. Configured SSL in Cloudflare to Full (Strict) mode
  3. Enabled Cloudflare

I got the same issue (502 bad gateway) as before.

Second, I tried the following;

  1. Generated Cloudflare origin CA certificate
  2. Installed the same certificate on cPanel server (followed instructions mentioned here: Cloudflare origin CA free SSL installation guide on Godaddy - Digital Candy web agency based in Hong Kong)
  3. Configured SSL in Cloudflare to Full (Strict) mode
  4. Enabled Cloudlfare

When I did the above initially I got the following error screen on the site (check certificate details)

After sometime I started getting the following error screen on the site (check the certificate is different this time despite doing nothing)

I tried all settings in Cloudflare SSL but I could not get the site to work properly. It continuously showed the 502 error.

Finally I had to pause Cloudflare again to get the site to work normally.

What should I do next?