5 year old Question...
Okay, I had this error, after installing my SSL Certificate and changing all links that were http
to https
using the wp-cli.phar found here.
I tried various configurations and none seemed to resolve this, unless I set this:
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
to this:
define('FORCE_SSL_ADMIN', false);
define('FORCE_SSL_LOGIN', false);
It allowed me to hit the log-in page, but then was unable to actually log-in. I tried answer two but that unfortunately didn't help either, Untill I did the following change:
/** SSL */
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== true)
$_SERVER['HTTPS']='on';
For some reason, I do not know why - I had to change the
!==
false
to
!==
true
I'm running nginx as host and reverse proxy to nginx unit...
If anyone has any idea why that worked, Please let me know