From f5de2660702f1d76b7c09604612f859b2b3b33bb Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 15 Mar 2024 20:36:16 +0100 Subject: [PATCH] Reflect horizon_webroot setting in Apache vhost configuration Changing only horizon_webroot is not sufficient without adjustments to horizon Apache vhost. Change-Id: I25707600c2b05a7f816a7c4ea38c8985717df2d3 (cherry picked from commit 552fcac1227342fe0ef70edecc31f3e8b9c45991) --- releasenotes/notes/horizon_webroot-098629f30f69f192.yaml | 6 ++++++ templates/openstack_dashboard.conf.j2 | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/horizon_webroot-098629f30f69f192.yaml diff --git a/releasenotes/notes/horizon_webroot-098629f30f69f192.yaml b/releasenotes/notes/horizon_webroot-098629f30f69f192.yaml new file mode 100644 index 00000000..b08f130f --- /dev/null +++ b/releasenotes/notes/horizon_webroot-098629f30f69f192.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Change of ``horizon_webroot`` variable is now respected and will be + reflected in Apache configuration to serve static files and define + wsgi path accordingly. \ No newline at end of file diff --git a/templates/openstack_dashboard.conf.j2 b/templates/openstack_dashboard.conf.j2 index f2c7df13..afdc8105 100644 --- a/templates/openstack_dashboard.conf.j2 +++ b/templates/openstack_dashboard.conf.j2 @@ -48,7 +48,7 @@ Listen {{ horizon_bind_address }}:{{ horizon_listen_port }} RequestHeader set {{ horizon_secure_proxy_ssl_header }} "http" {% endif %} - WSGIScriptAlias / {{ horizon_lib_wsgi_file }} + WSGIScriptAlias {{ horizon_webroot }} {{ horizon_lib_wsgi_file }} WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(horizon_wsgi_threads) }} threads={{ horizon_wsgi_threads }} python-path={{ horizon_lib_dir | dirname }}/site-packages WSGIProcessGroup horizon @@ -66,7 +66,7 @@ Listen {{ horizon_bind_address }}:{{ horizon_listen_port }} - Alias /static {{ horizon_lib_dir }}/static/ + Alias {{ horizon_webroot }}/static {{ horizon_lib_dir }}/static/ Options -FollowSymlinks