From ec9cefc87def5653d31032d99c40c7bd37305a7a Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Oct 2018 11:14:21 -0400 Subject: [PATCH 1/5] Update calibre-web.conf.j2 --- roles/calibre-web/templates/calibre-web.conf.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/calibre-web/templates/calibre-web.conf.j2 b/roles/calibre-web/templates/calibre-web.conf.j2 index 052cc66ce..a4fb4ee37 100644 --- a/roles/calibre-web/templates/calibre-web.conf.j2 +++ b/roles/calibre-web/templates/calibre-web.conf.j2 @@ -11,7 +11,9 @@ RequestHeader set X-SCHEME http ProxyPass {{ calibreweb_url }} http://localhost:{{ calibreweb_port }}/ -# Appears unnec: +# Possibly unnec? (ProxyPassReverse rewrites internal links, that come back +# from proxy! Whereas e.g. kiwix.conf doesn't need this, as kiwix itself +# prefixes URLs, thanks to --urlRootLocation=/kiwix/ in its systemd file.) ProxyPassReverse {{ calibreweb_url }} http://localhost:{{ calibreweb_port }}/ # From 812d326873e655ee5125d9fe2daddfdce13df5ba Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Oct 2018 11:14:46 -0400 Subject: [PATCH 2/5] Update kiwix.conf.j2 --- roles/kiwix/templates/kiwix.conf.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/kiwix/templates/kiwix.conf.j2 b/roles/kiwix/templates/kiwix.conf.j2 index 3132ba2e8..634102ef3 100644 --- a/roles/kiwix/templates/kiwix.conf.j2 +++ b/roles/kiwix/templates/kiwix.conf.j2 @@ -8,4 +8,9 @@ RedirectMatch ^{{ kiwix_alias_url }}$ {{ kiwix_url }} # 2018-08-31: SUCCEEDS in enabling http://box/kiwix/ & http://box/kiwix/zim & http://box/kiwix/zim/ #ProxyPreserveHost On ProxyPass {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }} + +# CLARIF: ProxyPassReverse rewrites internal links, that come back from proxy. +# Whereas e.g. calibre-web.conf (and many others) use this, kiwix.conf doesn't +# as kiwix itself prefixes URLs, thanks to --urlRootLocation=/kiwix/ in kiwix's +# systemd file arising from roles/kiwix/templates/kiwix-serve.service.j2 #ProxyPassReverse {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }} From bab333b3f137c2acfdd62629aa7a0d4df025419d Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Oct 2018 11:24:10 -0400 Subject: [PATCH 3/5] Update calibre-web.conf.j2 --- roles/calibre-web/templates/calibre-web.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/calibre-web/templates/calibre-web.conf.j2 b/roles/calibre-web/templates/calibre-web.conf.j2 index a4fb4ee37..85db95f10 100644 --- a/roles/calibre-web/templates/calibre-web.conf.j2 +++ b/roles/calibre-web/templates/calibre-web.conf.j2 @@ -12,7 +12,7 @@ RequestHeader set X-SCHEME http ProxyPass {{ calibreweb_url }} http://localhost:{{ calibreweb_port }}/ # Possibly unnec? (ProxyPassReverse rewrites internal links, that come back -# from proxy! Whereas e.g. kiwix.conf doesn't need this, as kiwix itself +# from Apache proxy. Whereas e.g. kiwix.conf doesn't need this, as kiwix itself # prefixes URLs, thanks to --urlRootLocation=/kiwix/ in its systemd file.) ProxyPassReverse {{ calibreweb_url }} http://localhost:{{ calibreweb_port }}/ From 41d6cf4cb65bb7100b7180267441b06329f4cca5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Oct 2018 11:26:18 -0400 Subject: [PATCH 4/5] Update kiwix.conf.j2 --- roles/kiwix/templates/kiwix.conf.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/kiwix/templates/kiwix.conf.j2 b/roles/kiwix/templates/kiwix.conf.j2 index 634102ef3..763a5ad97 100644 --- a/roles/kiwix/templates/kiwix.conf.j2 +++ b/roles/kiwix/templates/kiwix.conf.j2 @@ -8,9 +8,9 @@ RedirectMatch ^{{ kiwix_alias_url }}$ {{ kiwix_url }} # 2018-08-31: SUCCEEDS in enabling http://box/kiwix/ & http://box/kiwix/zim & http://box/kiwix/zim/ #ProxyPreserveHost On ProxyPass {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }} - -# CLARIF: ProxyPassReverse rewrites internal links, that come back from proxy. -# Whereas e.g. calibre-web.conf (and many others) use this, kiwix.conf doesn't -# as kiwix itself prefixes URLs, thanks to --urlRootLocation=/kiwix/ in kiwix's -# systemd file arising from roles/kiwix/templates/kiwix-serve.service.j2 +12345678901234567890123456789012345678901234567890123456789012345678901234567890 +# CLARIF: ProxyPassReverse rewrites internal links, that come back from Apache +# proxy. Whereas e.g. calibre-web.conf (and others) use this, kiwix.conf does +# not, as kiwix itself prefixes URLs thanks to --urlRootLocation=/kiwix/ in +# kiwix's systemd file arising from roles/kiwix/templates/kiwix-serve.service.j2 #ProxyPassReverse {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }} From c776d6ab0b433ace13179bb7b787aa71365535e1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Fri, 19 Oct 2018 11:26:43 -0400 Subject: [PATCH 5/5] Update kiwix.conf.j2 --- roles/kiwix/templates/kiwix.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kiwix/templates/kiwix.conf.j2 b/roles/kiwix/templates/kiwix.conf.j2 index 763a5ad97..f8d1a5840 100644 --- a/roles/kiwix/templates/kiwix.conf.j2 +++ b/roles/kiwix/templates/kiwix.conf.j2 @@ -8,7 +8,7 @@ RedirectMatch ^{{ kiwix_alias_url }}$ {{ kiwix_url }} # 2018-08-31: SUCCEEDS in enabling http://box/kiwix/ & http://box/kiwix/zim & http://box/kiwix/zim/ #ProxyPreserveHost On ProxyPass {{ kiwix_url }} http://127.0.0.1:{{ kiwix_port}}{{ kiwix_url }} -12345678901234567890123456789012345678901234567890123456789012345678901234567890 + # CLARIF: ProxyPassReverse rewrites internal links, that come back from Apache # proxy. Whereas e.g. calibre-web.conf (and others) use this, kiwix.conf does # not, as kiwix itself prefixes URLs thanks to --urlRootLocation=/kiwix/ in