From 41f3380691ed2cebd9dc6ecba88d3f86ac988b02 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 9 Feb 2022 13:49:21 +0200 Subject: [PATCH] Move Listen definition to VHosts In order to avoid conflicts with other applications running Apache, like keystone, we avoid using ports.conf for Listen and using VHost files for this purpose. We place same dummy template as keystone does for upgrade purposes. Change-Id: I8a5ef5234b8aee1e7b3517e9543d2af0a84e90ce --- templates/horizon_apache_ports.conf.j2 | 7 ++++--- templates/openstack_dashboard.conf.j2 | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/templates/horizon_apache_ports.conf.j2 b/templates/horizon_apache_ports.conf.j2 index a022348e..3c32de37 100644 --- a/templates/horizon_apache_ports.conf.j2 +++ b/templates/horizon_apache_ports.conf.j2 @@ -1,5 +1,6 @@ # {{ ansible_managed }} -{% for horizon_listen_port in horizon_listen_ports.values() %} -Listen {{ horizon_bind_address }}:{{ horizon_listen_port }} -{% endfor %} +# We place a blank file here +# Listen commands happen inside the individual VHost files +# This allows for multiple services VHosts to exist without +# overwriting Listen lines. diff --git a/templates/openstack_dashboard.conf.j2 b/templates/openstack_dashboard.conf.j2 index 194de591..f2c7df13 100644 --- a/templates/openstack_dashboard.conf.j2 +++ b/templates/openstack_dashboard.conf.j2 @@ -1,5 +1,9 @@ # {{ ansible_managed }} +{% for horizon_listen_port in horizon_listen_ports.values() %} +Listen {{ horizon_bind_address }}:{{ horizon_listen_port }} +{% endfor %} + # If horizon is being served via SSL from this web server, # then we must redirect HTTP requests to HTTPS. {% if (horizon_enable_ssl | bool) and not (horizon_external_ssl | bool) %}