Describe the bug
Not necessarily a bug, but a feature request. I could've probably done a pull request but logged it this way instead.
The template does not allow setting the --urlRootLocation or -r argument to support using a reverse proxy.
Documentation for the option: https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html#cmdoption-r
To Reproduce
Steps to reproduce the behavior:
- Run docker container for kiwix-serve
- Configure reverse proxy of your choice with something like https://example.com/kiwix
- Attempt to navigate to the reverse proxy URL
- Kiwix won't load based on how it rewrites URLs by default based on the base URL
Expected behavior
Once implemented, Kiwix can be displayed through a reverse proxy.
Screenshots
None to provide. It just won't work.
Additional context
The fix should be easy to implement. Something like below. In my testing, it worked by hardcoding the argument and value without using environment variables.
In /usr/local/bin/start.sh add the following to the CMD line
CMD="/usr/local/bin/kiwix-serve --port=$PORT --urlRootLocation=$urlRoot $@"
Then add a default variable for urlRoot in the template and allow it to be set. In this case the environment variable urlRoot being set to kiwix would work for https://example.com/kiwix through the reverse proxy as intended.
Describe the bug
Not necessarily a bug, but a feature request. I could've probably done a pull request but logged it this way instead.
The template does not allow setting the
--urlRootLocationor-rargument to support using a reverse proxy.Documentation for the option: https://kiwix-tools.readthedocs.io/en/latest/kiwix-serve.html#cmdoption-r
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Once implemented, Kiwix can be displayed through a reverse proxy.
Screenshots
None to provide. It just won't work.
Additional context
The fix should be easy to implement. Something like below. In my testing, it worked by hardcoding the argument and value without using environment variables.
In
/usr/local/bin/start.shadd the following to the CMD lineCMD="/usr/local/bin/kiwix-serve --port=$PORT --urlRootLocation=$urlRoot $@"Then add a default variable for urlRoot in the template and allow it to be set. In this case the environment variable urlRoot being set to kiwix would work for https://example.com/kiwix through the reverse proxy as intended.