Skip to content
Snippets Groups Projects
Commit b91797cc authored by jurgenhaas's avatar jurgenhaas
Browse files

Properly define reverse proxy IPs even if we have redundant gateways

parent 4727c07c
Branches
No related tags found
No related merge requests found
......@@ -28,9 +28,12 @@ $conf['file_directory_temp'] = {% if drupal.jail is defined %}function_exists('d
$conf['syslog_identity'] = 'drupal_{{ item.domain }}';
{% if varnish_host|default(false) %}
{% if reverse_proxy_ips|default(false) %}
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array("{{ varnish_host_ip|default('') }}");
$conf['reverse_proxy_addresses'] = array("{{ reverse_proxy_ips|join('","') }}");
{% endif %}
{% if varnish_host|default(false) %}
$conf['varnish_cache_clear'] = '{{ varnish_cache_clear }}';
$conf['varnish_control_key'] = '{{ varnish_control_key }}';
{% if varnish_host == inventory_hostname %}
......
......@@ -45,9 +45,12 @@ $conf['file_temporary_path'] = {% if drupal.jail is defined %}drupal_is_cli() ?
$conf['syslog_identity'] = 'drupal_{{ item.domain }}';
{% if varnish_host|default(false) %}
{% if reverse_proxy_ips|default(false) %}
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array("{{ varnish_host_ip|default('') }}", "127.0.0.1");
$conf['reverse_proxy_addresses'] = array("{{ reverse_proxy_ips|join('","') }}","127.0.0.1");
{% endif %}
{% if varnish_host|default(false) %}
$conf['varnish_cache_clear'] = '{{ varnish_cache_clear }}';
$conf['varnish_control_key'] = '{{ varnish_control_key }}';
{% if varnish_host == inventory_hostname %}
......
......@@ -35,9 +35,9 @@ $settings['container_yamls'][] = __DIR__ . '/services.yml';
$settings['install_profile'] = '{{ item.install_profile|default("standard") }}';
$settings['file_public_path'] = 'sites/{{ item.shortname|default("default") }}/files';
$settings['file_private_path'] = 'sites/{{ item.shortname|default("default") }}/private';
{% if varnish_host|default(false) %}
{% if reverse_proxy_ips|default(false) %}
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array("{{ varnish_host_ip|default('') }}", "127.0.0.1");
$settings['reverse_proxy_addresses'] = array("{{ reverse_proxy_ips|join('","') }}","127.0.0.1");
{% endif %}
{% for config in item.conf|default([]) %}
$settings['{{ config.key }}'] = {{ config.value }};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment