mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1970 from holta/kolibri-url-redirect
Enable http://box/kolibri without trailing slash too
This commit is contained in:
commit
c746e6ddd1
4 changed files with 14 additions and 7 deletions
|
@ -24,9 +24,9 @@ kiwix_src_file_linux64: "{{ kiwix_version_linux64 }}.tar.gz"
|
|||
kiwix_src_file_i686: "{{ kiwix_version_i686 }}.tar.gz"
|
||||
|
||||
# Used for Kiwix proxy http://box/kiwix/
|
||||
kiwix_url: /kiwix/
|
||||
kiwix_alias_url: /kiwix
|
||||
kiwix_path: "{{ iiab_base }}/kiwix" # /opt/iiab
|
||||
kiwix_url_without_slash: /kiwix
|
||||
kiwix_url: "{{ kiwix_url_without_slash }}/" # /kiwix/
|
||||
kiwix_path: "{{ iiab_base }}/kiwix" # /opt/iiab/kiwix
|
||||
|
||||
# /library/zims contains 3 important things:
|
||||
# - library.xml
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
# SEE https://github.com/iiab/iiab/blob/master/roles/kolibri/templates/kolibri.conf.j2
|
||||
|
||||
# 2018-08-31: FAILS to enable http://box/kiwix
|
||||
#RewriteEngine on
|
||||
#RewriteRule ^{{ kiwix_alias_url }}$ {{ kiwix_url }} [R]
|
||||
#RewriteRule ^{{ kiwix_url_without_slash }}$ {{ kiwix_url }} [R]
|
||||
|
||||
# 2018-08-31: SUCCEEDS in enabling http://box/kiwix
|
||||
RedirectMatch ^{{ kiwix_alias_url }}$ {{ kiwix_url }}
|
||||
RedirectMatch ^{{ kiwix_url_without_slash }}$ {{ kiwix_url }}
|
||||
|
||||
# 2018-08-31: SUCCEEDS in enabling http://box/kiwix/ & http://box/kiwix/zim & http://box/kiwix/zim/
|
||||
#ProxyPreserveHost On
|
||||
|
|
|
@ -12,8 +12,10 @@
|
|||
# Kolibri folder to store its data and configuration files.
|
||||
kolibri_home: "{{ content_base }}/kolibri" # /library/kolibri
|
||||
|
||||
kolibri_url: /kolibri
|
||||
kolibri_venv_path: /usr/local/kolibri
|
||||
kolibri_url_without_slash: /kolibri
|
||||
kolibri_url: "{{ kolibri_url_without_slash }}/" # /kolibri/
|
||||
|
||||
kolibri_venv_path: /usr/local/kolibri # For /usr/local/kolibri/bin/kolibri
|
||||
# 2018-07-16: IIAB recommends /usr/bin but @arky says this isn't yet possible, due to pip
|
||||
kolibri_exec_path: "{{ kolibri_venv_path }}/bin/kolibri"
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# SEE https://github.com/iiab/iiab/blob/master/roles/kiwix/templates/kiwix.conf.j2
|
||||
RedirectMatch ^{{ kolibri_url_without_slash }}$ {{ kiwix_url }}
|
||||
|
||||
ProxyPreserveHost On
|
||||
ProxyPass {{ kolibri_url }} http://localhost:{{ kolibri_http_port }}{{ kolibri_url }}
|
||||
ProxyPassReverse {{ kolibri_url }} http://localhost:{{ kolibri_http_port }}{{ kolibri_url }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue