muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.28k stars 319 forks source link

Allow subdirectory in CANONICAL_URL parameter #250

Open MoriTanosuke opened 5 years ago

MoriTanosuke commented 5 years ago

I tried to set up beehive in my existing setup using Docker containers on a private network and an apache reverse proxy container in front of those containers. I tried to configure my reverse proxy in the usual way

<Location "/beehive/">
        ProxyPass               http://beehivehost:8181/
        ProxyPassReverse        http://beehivehost:8181/
        # ... auth and stuff
</Location>

I also started the beehive container with env var CANONICAL_URL=https://mydomain/beehive but I only get a blank page when I try to open beehive. I noticed that beehive generates relative links in the HTML to the root and not to /beehive/...:

...
<script src="/assets/vendor-b3fb1a9072b30aa6b2b5a5a6f72c2d21.js"  ></script>
<script src="/assets/beehive-admin-a5b1e40caf9c5a7c62f689308573a1d0.js"  ></script>
...

I could load mod_proxy_html to fix this, but I'd like beehive to be configurable to run from a subdirectory directly. Do you think this is possible? Could this be integrated into CANONICAL_URL?

I saw that this was already mentioned in https://github.com/muesli/beehive/issues/95#issuecomment-280889290

rwv37 commented 3 years ago

I'm trying something very similar (I have beehive running on a FreeBSD box, and am trying to use Apache on that same box as a reverse proxy to provide https, authentication, and nonlocal access). I am running into the same problem (blank page, trying to pull scripts from "/assets"). I am apparently too dumb to use mod_proxy_html correctly, although I'll keep trying.

So, I'm wondering if there is any news on this. I see the question is getting near two years old, is open, has no one assigned to it, and has no milestone attached, so I'm guessing it's way on the backburner.