Score:2

How do I fix the base URL issue while using load balancer

hk flag

Since base URL is deprecated, and our Drupal 9 Site is using a load balancer, we are facing issues when setting up the base URL. Instead of the base URL, it displays the load balancer IP.

Any help regarding the issue is appreciated.

I made the following changes to the settings.php file.

$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']);
$settings['reverse_proxy_host_header'] = 'X-ORIGINAL-HOST';

$settings['trusted_host_patterns'] = [
  '^d9\.johndoe\.dev$',
  '^10\.101\.9\.23$',
];

This worked for Drupal 8 but not for Drupal 9.

I followed what reported in these links.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.