From 606693c3f351b3cd3e42610e1f5be9be479001d3 Mon Sep 17 00:00:00 2001 From: Tim Moody Date: Wed, 1 Apr 2020 08:49:04 -0400 Subject: [PATCH] Ivan Savav's workaround --- roles/kolibri/templates/kolibri-nginx.conf.j2 | 8 +++++++- roles/kolibri/templates/kolibri.service.j2 | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/roles/kolibri/templates/kolibri-nginx.conf.j2 b/roles/kolibri/templates/kolibri-nginx.conf.j2 index 163d0ee95..fc4309fbb 100644 --- a/roles/kolibri/templates/kolibri-nginx.conf.j2 +++ b/roles/kolibri/templates/kolibri-nginx.conf.j2 @@ -1,4 +1,4 @@ -location /kolibri/ { +location {{ kolibri_url_without_slash }} { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; @@ -6,3 +6,9 @@ location /kolibri/ { proxy_pass http://127.0.0.1:8009; } +location /static/mathjax/2.1/ { + rewrite ^(.*)$ /kolibri$1 permanent; +} +location /static/images/spinner.gif { + rewrite ^(.*)$ /kolibri$1 permanent; +} diff --git a/roles/kolibri/templates/kolibri.service.j2 b/roles/kolibri/templates/kolibri.service.j2 index 46df59aca..80faf1850 100644 --- a/roles/kolibri/templates/kolibri.service.j2 +++ b/roles/kolibri/templates/kolibri.service.j2 @@ -7,7 +7,7 @@ RemainAfterExit=yes Environment=KOLIBRI_USER={{ kolibri_user }} Environment=KOLIBRI_HOME={{ kolibri_home }} Environment=KOLIBRI_HTTP_PORT={{ kolibri_http_port }} -Environment=KOLIBRI_URL_PATH_PREFIX={{ kolibri_url }} +Environment=KOLIBRI_URL_PATH_PREFIX={{ kolibri_url_without_slash }} User={{ kolibri_user }} Group={{ apache_user }} TimeoutStartSec=infinity