After updating a blog from a http to a https protocol,
I was facing a common problem: the wordpress wp-admin infinite loop.
After googling a lot, trying a lot of configuration, restarting nginx / apache so many time, I decided to trace the redirection into the wp-include files (wp-admin.php, index.php, admin.php)
I finally found the guilty: is_ssl which fails because of the $_SERVER[‘HTTPS’] variable which wasn’t set in my nginx proxy pass configuration.
proxy_set_header X-Forwarded-Proto $scheme;
Have a look on this thread.
Follow the instructions:
Websites behind load balancers or reverse proxies that support HTTP_X_FORWARDED_PROTO can be fixed by adding the following code to the wp-config.php file, above the require_once call:if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS'] = 'on';