Put reverse-proxy in front of arbitrary apps
-
Hey folks,
we've started using an install of the Outline app in our Cloudron to serve as a public facing knowledge base / help center for our company.
Outline is a great fit here as it offers public shares of nested documents that is pretty much exactly what we want. We just add one "root" document in that install, share that and the whole help center will be shared through that.
We are facing two problems now
- We want to avoid showing users an Outline login or anything similar in the help center
- We want e.g. the root URL (
/
) to point to that "root document" instead of Outlines regular home, which for logged out users would be a login form (see 1)
Our solution
What we did is to fork the Outline app, add multi-domain capabilities (that would be easy to upstream) and put NGinx in front of the app in the Docker image.
That Nginx now redirects the root url to the specific root document and also redirects all traffic to Outline's auth to the root url.
You can see the result at: https://hilfe.easy-review.de/ (German)
What the heck is this post about?!
Sorry for the long preface: What I want to know/discuss is: Is there a world in which we don't need to fork the app but could have some sort of minimal mechanism like a mini-Cloudflare-worker equivalent that allows us to customize an app install with some redirect routes?
Does Cloudron put a reverse-proxy in front of any app anyways? Maybe there could be a way to add custom pieces to that proxy's config to allow such redirects?
Thanks for anyone who as a good idea here and hope there is a path here to make Cloudron a tiny bit more awesome yet again
Thorben
-
Interesting approach. Cloudron always has an nginx reverse proxy already in front of it. But that can't be customized in the way you require it. Forking the app and putting an extra customized reverse proxy in the package seem the way to got for such a specialized use-case.
If you want to leverage the default outline Cloudron package instead, maybe it is possible to just put the reverse proxy into a new app which then proxies the requests to the outline app instance?
-
It would reach it via the public domain I would guess, so it is not dependent on the local docker network addresses.
All this is not an elegant solution for sure but to have this well supported we would need to have a quite sophisticated reverseproxy/nginx config UI somehow.