I finally managed to make my Wordpress page accessible via https / force https behind a reverse proxy thanks to this answer.
But now I can not get into the backend anymore. Any attempt to login just results in a redirect to the login page without actually logging in and the error message:
Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
My attempts to solve this via changes to WP_HOME and WP_SITEURL just resulted in my prior problem being an endless redirect loop and my site not being reachable at all.
My changes to the .htaccess file did not seem to have any effects at all, this might be because the proxy already enforces (redirects to) https.
Has anyone any idea why this is happening and how to solve it?
Thanks in advance!
My configuration from the linked answer:
wp-config:
define('WP_HOME','//'. $_SERVER['SERVER_NAME']);
define('WP_SITEURL','//'. $_SERVER['SERVER_NAME']);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
.htaccess:
# http to https
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule . https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
Otherwise it is a clean wordpress page no plugins, default theme.