Running Wordpress 4.7.3 with a HAProxy (version 1.7.2) frontend and Apache 2.4.10 with PHP 5.6 backend.
This is all under
Debian 8.7 as well.
X-Forwarded-Proto are set correctly by HAProxy.
The issue I'm having is when I have SSL terminated on the HAProxy frontend (running http mode) and login to Wordpress Admin I get the error
Sorry, you are not allowed to access this page.
I tried the steps from here but they didn't fix the issue.
At the bottom of my
wp-config.php I have
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') !== false) $_SERVER['HTTPS']='on';
I tried a clean install of Wordpress (was importing a clients side of an earlier Wordpress for spring cleaning, but that didn't fix the issue either).