Cannot login ***/wp-admin. Get return error 502

Hi. My website act just normal for user. However, when I want to login my wordpress admin panel, I got error 502. I can get access to login page, but, when I click login, it give an error 502. Why this happen yeah? I disable all the cloudflare proxy at dns setting, and I can get access to my wordpress admin panel again. However, I do not want to disable those cloudflare proxy, because it will effect my website speed. Thus, how to resolve this issue without disable cloudflare proxy yeah? Thank you.

Was your website working in HTTPS without Cloudflare? And what is your SSL encryption mode?

1 Like

Hi. Yes, website working fine in https without Cloudflare. SSL encryption mode is Full.

If your SSL certificate in your server is valid then you should use Full (strict) instead.

Anyway, I believe your wp-admin is also accessible via HTTPS without Cloudflare right?

1 Like

Yes, it is accessible. But, if cloudflare is active, I cannot get access into wp-admin

May I ask is this error comming from Cloudflare or your origin host / server?
Can you post a screenshot of it?
Does anything else appear in the Console (Developer Tools)?

Have you tried turning the debug mode on and re-check if anything appears at the debug.log file?

Is WordPress admin working over HTTPS connection, or better to ask is SSL defined in the wp-config.php as follows on the below article:

As @erictung already asked if WordPress was installed and working over HTTPS (home_url, blog_url both on https://yourdomain.com or with www prefix?), but may I ask could it be due to some cookie settings in a Web browser (or by the defined COOKIE_DOMAIN with or without www prefix in wp-config.php maybe)?

Nevertheless, have you checked if you block any Cloudflare connections to your origin host / server?