Trivial fix horizon's healthcheck when SSL turned on

This patch is fixing docker healthcheck for horizon
by changing value of horizon_listen_port, so
both apache's virtualhost and healthcheck will have
same correct port always. Also removing useless
apache's redirect as all redirects are done on
haproxy side.

Closes-Bug: #1933846
Change-Id: Ibb5ad1a5d1bbc74bcb62610d77852d8124c4a323
This commit is contained in:
Michal Arbet 2021-06-28 16:42:49 +02:00
parent a73e89f03f
commit 6ac4638cfb
3 changed files with 7 additions and 7 deletions

View File

@ -326,7 +326,7 @@ heat_api_cfn_listen_port: "{{ heat_api_cfn_port }}"
horizon_port: "80"
horizon_tls_port: "443"
horizon_listen_port: "{{ horizon_port }}"
horizon_listen_port: "{{ horizon_tls_port if horizon_enable_tls_backend | bool else horizon_port }}"
influxdb_http_port: "8086"

View File

@ -13,7 +13,7 @@ ServerSignature Off
ServerTokens Prod
TraceEnable off
<VirtualHost *:{{ horizon_listen_port }}>
<VirtualHost {{ api_interface_address }}:{{ horizon_listen_port }}>
LogLevel warn
ErrorLog /var/log/kolla/horizon/horizon.log
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
@ -50,11 +50,6 @@ TraceEnable off
{% endif %}
</VirtualHost>
{# FIXME(yoctozepto): enabling of either tls will break the other if not enabled too #}
{% if kolla_enable_tls_external | bool or kolla_enable_tls_internal | bool %}
Header edit Location ^http://(.*)$ https://$1
{% endif %}
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Json, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes horizon's healthcheck when SSL is turned on.
`LP#1933846 <https://launchpad.net/bugs/1933846>`__