Wordpress wp-admin hinter HAproxy

Hinter einem HAProxy funktioniert wp-admin erst, wenn man die Dateoi wp-config.php anpasst.

Der untenstehende Code muss ganz am Anfang in wp-config.php stehen, direkt nach dem <?php Tag. Wenn der Code an einem anderen Ort in der Datei steht, dann funktioniert es nicht!

/** Make sure WordPress understands it's behind an SSL terminator */ define('FORCE_SSL_ADMIN', true); define('FORCE_SSL_LOGIN', true); if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';

Quelle:

https://wordpress.stackexchange.com/questions/287532/https-leads-to-sorry-you-are-not-allowed-to-access-this-page