0

We have a Drupal 8 site, which is behind a Load Balancer (lets say the I.P of Load Balancer is a.b.c.d). This Load Balancer is further behind a Reverse Proxy (lets say the I.P of Reverse Proxy is e.f.g.h).

What should the reverse proxy settings in settings.php look like?

What should be in the array value for $settings['reverse_proxy_addresses'] ?

I'm assuming the settings would be the one mentioned below. Is it correct?

$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array('a.b.c.d', 'e.f.g.h');
  • You can add both, but normally Drupal sees only the IP of the nearest one. The headers on the other hand you have to configure for the one further behind, because this is the one which connects to the client – 4k4 Aug 5 '19 at 18:35
  • @4k4 Thanks. Can you please tell what you mean by configuring headers? – Martin Borugadda Aug 5 '19 at 18:55
  • That's the point of trusting a proxy connection, getting headers with client information. See symfony.com/doc/current/deployment/proxies.html – 4k4 Aug 5 '19 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.