I have a Drupal 7 website on the domain hiddendomain.be:3200. Users visiting publicdomain.be are proxied to the hidden domain. My home page is rendered just fine, but when I log in with the existing account TestUser, I get a "You don't have access rights to this page" message. It seems that Drupal still handles the user as anonymous, because going to publicdomain.be/user immediately afterwards returns the login form again. However, in the log report, a new session has been created for TestUser. Why does this happen?
I have been browsing the web for answers, but the only thing I found was to edit the
settings.php file in the default directory (in my case that is
settings.local.php) by adding
$conf['reverse_proxy'] = TRUE; $conf['reverse_proxy_addresses'] = array('IP');
where IP is the IP address of the publicdomain.be server. Unfortunately, this does not work. What am I doing wrong?