Skip to content

Use Kiwix default URI box.lan/kiwix#980

Merged
holta merged 3 commits intoiiab:masterfrom
arky:kiwix-fixes
Aug 6, 2018
Merged

Use Kiwix default URI box.lan/kiwix#980
holta merged 3 commits intoiiab:masterfrom
arky:kiwix-fixes

Conversation

@arky
Copy link
Copy Markdown
Contributor

@arky arky commented Aug 6, 2018

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

Enhances Kiwix proxypass settings, updates kiwix readme file.

Modifies one variable kiwix_url from /kiwix/ to /kiwix

Fixes #979
@holta holta added this to the 6.6 milestone Aug 6, 2018
@holta
Copy link
Copy Markdown
Member

holta commented Aug 6, 2018

@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?

@holta
Copy link
Copy Markdown
Member

holta commented Aug 6, 2018

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.

@arky
Copy link
Copy Markdown
Contributor Author

arky commented Aug 6, 2018

@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.

#980 (comment)

@holta
Copy link
Copy Markdown
Member

holta commented Aug 6, 2018

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 ?

@holta
Copy link
Copy Markdown
Member

holta commented Aug 6, 2018

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.

@holta
Copy link
Copy Markdown
Member

holta commented Aug 6, 2018

Tested flawlessly on Ubuntu 18.04 and 16.04 and Raspbian Lite.

Clarif- on Ubuntu 18.04.1 http://box/kiwix2 currently/correctly returns:

Not Found
The requested URL /kiwix2 was not found on this server.
Apache/2.4.29 (Ubuntu) Server at 10.8.0.x Port 80

Likewise on Ubuntu 16.04.5...

...
Apache/2.4.18 (Ubuntu) Server at 10.8.0.y Port 80

Likewise on the lastest / apt-updated Raspbian Lite...

...
Apache/2.4.25 (Raspbian) Server at 10.8.0.z Port 80

@holta holta merged commit 32cc117 into iiab:master Aug 6, 2018
@tim-moody
Copy link
Copy Markdown
Contributor

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.

@tim-moody
Copy link
Copy Markdown
Contributor

Actually I was wrong about the need to rewrite to provide box.lan/kiwix access. However, the following kiwix.conf is sufficient:

RewriteEngine on
RewriteRule ^/kiwix$ /kiwix/ [R]

ProxyPass /kiwix/ http://127.0.0.1:3000/kiwix/

@holta
Copy link
Copy Markdown
Member

holta commented Aug 7, 2018

Thanks so much Tim! @arky can you perhaps offer a compromise PR in the coming 24h if you have time?

@holta holta mentioned this pull request Aug 7, 2018
@holta
Copy link
Copy Markdown
Member

holta commented Aug 7, 2018

@arky can you perhaps offer a compromise PR in the coming 24h if you have time?

Or is PR #985 perhaps enough?

@holta holta mentioned this pull request Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants