Use Kiwix default URI box.lan/kiwix#980
Conversation
Enhances Kiwix proxypass settings, updates kiwix readme file. Modifies one variable kiwix_url from /kiwix/ to /kiwix Fixes #979
|
@arky can you confirm that http://box:3000/kiwix and http://box:3000/kiwix/ work for people who want to avoid the proxy for privacy reasons? |
|
Overall: I'm greatly in favor of this PR if it provides a clean way to put a lid on the ongoing support nightmare of implementers/teachers/users typing in http://box/kiwix and getting Extremely Frustrated by the (up until now) non-natural need for a trailing slash. |
|
@holta To be precise. This patch only fixes the Apache httpd http://box/kiwix using mod_proxy and mod_rewrite. The http://box:3000 addresses are served by kiwix-serve process. You might need to fix those in separate issue or PR. |
|
FYI quick testing shows that http://box:3000/kiwix does not work (when there is no trailing slash). This is unfortunate, but as @arky suggests above: this problem might be built into kiwix-serve ? |
|
Tested flawlessly on Ubuntu 18.04 and 16.04 and Raspbian Lite. @tim-moody, @georgejhunt & @jvonau please suggest any further revisions/improvements building upon this. |
Clarif- on Ubuntu 18.04.1 http://box/kiwix2 currently/correctly returns:
Likewise on Ubuntu 16.04.5...
Likewise on the lastest / apt-updated Raspbian Lite...
|
|
If the goal of this PR is simply to convert the kiwix proxy from box/kiwix/ to box/kiwix then the changes to the apache config are not necessary. Only the default kiwix_url needs to be changed. In addition adding a ProxyPassReverse when kiwix does its own reverse proxy internally is at best unnecessary and at worst will have unintended consequences. Nor do I believe the ProxyPreserveHost On is beneficial when host is not part of any the proxy urls. If the desire is to change the proxy url from /kiwix/ to /kiwix then simply changing the url_prefix should do this. This will break menuing, but that can be fixed rather than patched with a RewriteRule. And none of this has anything to do with what kiwix does on port 3000. |
|
Actually I was wrong about the need to rewrite to provide box.lan/kiwix access. However, the following kiwix.conf is sufficient: RewriteEngine on ProxyPass /kiwix/ http://127.0.0.1:3000/kiwix/ |
|
Thanks so much Tim! @arky can you perhaps offer a compromise PR in the coming 24h if you have time? |
Enhances Kiwix proxypass settings, updates kiwix readme file.
Fixes Bug
Fixes #979
Description of changes proposed in this pull request.
Modifies one variable kiwix_url from /kiwix/ to /kiwix
Smoke-tested in operating system.
Raspbian Stretch
Mention a team member for further information or comment using @ name
@holta