From 4aafe49443605220e17f16663799cc4345448bf6 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Thu, 6 Jul 2017 17:11:01 -0700 Subject: [PATCH] do everything with substitute --- roles/kalite/templates/kalite.conf | 43 +++++++----------------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/roles/kalite/templates/kalite.conf b/roles/kalite/templates/kalite.conf index 5e8875543..e230f688e 100644 --- a/roles/kalite/templates/kalite.conf +++ b/roles/kalite/templates/kalite.conf @@ -1,39 +1,16 @@ - ProxyRequests Off - ProxyVia Off + RewriteEngine on - ProxyPass /kalite http://127.0.0.1:8008 - ProxyPassReverse /kalite http://127.0.0.1:8008 - - ProxyPass "/learn" "http://127.0.0.1:8008/learn" - ProxyPassReverse "/learn" "http://127.0.0.1:8008/learn" - - ProxyPass "/kalite_mgmt" "http://127.0.0.1:8008/management" - ProxyPassReverse "/kalite_mgmt" "http://127.0.0.1:8008/management" - - ProxyPass "/coachreports" "http://127.0.0.1:8008/coachreports" - ProxyPassReverse "/coachreports" "http://127.0.0.1:8008/coachreports" - - ProxyPass "/static" "http://127.0.0.1:8008/static" - ProxyPassReverse "/static" "http://127.0.0.1:8008/static" - - ProxyPass "/update" "http://127.0.0.1:8008/update" - ProxyPassReverse "/update" "http://127.0.0.1:8008/update" - - ProxyPass "/_generated" "http://127.0.0.1:8008/_generated" - ProxyPassReverse "/_generated" "http://127.0.0.1:8008/_generated" - - ProxyPass "/securesync" "http://127.0.0.1:8008/securesync" - ProxyPassReverse "/securesync" "http://127.0.0.1:8008/securesync" - - ProxyPass "/api" "http://127.0.0.1:8008/api" - ProxyPassReverse "/api" "http://127.0.0.1:8008/api" - - ProxyPass "/kalite_content" "http://127.0.0.1:8008/content" - ProxyPassReverse "/kalite_content" "http://127.0.0.1:8008/content" + RewriteRule "^/kalite(.*)" "http://127.0.0.1:8008$1" AddOutputFilterByType SUBSTITUTE text/html - Substitute "s|/management/|/kalite_mgmt/|i" - Substitute "s|/content/|/kalite_content/|i" + Substitute "s|/management/|/kalite/management/|i" + Substitute "s|/coachreports/|/kalite/coachreports/|i" + Substitute "s|/static/|/kalite/static/|i" + Substitute "s|/update/|/kalite/update/|i" + Substitute "s|/_generated/|/kalite/_generated/|i" + Substitute "s|/securesync/|/kalite/securesync/|i" + Substitute "s|/api/|/kalite/api/|i" + Substitute "s|/content/|/kalite/content/|i"