Serve IntelOwl Behind Subpath
What happened
IntelOwl does not work correctly behind a subpath when using a reverse proxy like Nginx.
What did you expect to happen
IntelOwl should, aside from the default, leverage a user-defined subpath to allow for hosting IntelOwl along other services on a single server/domain.
How to reproduce your issue
Configure Nginx or a similar reverse to proxy IntelOwl traffic.
Would you mind giving more information on this? To begin with, What is your hosting set up? Are you using the default prod configs that IntelOwl provides?
As you can see here: https://github.com/intelowlproject/IntelOwl/blob/489ad67131ae81edc1a00103cc0d190071bc3cac/docker/default.yml#L36
IntelOwl already comes with nginx enabled.
What exactly isn't working?
For example, if I am hosting IntelOwl behind an instance of nginx that proxies several applications, I need to have a way to host it behind a subpath, like /intelowl, /app2, /app3, and so on. Currently, IntelOwl provides a static base path, so when it tries to refer to itself when being proxied in such a way, it tries to navigate to the root (/). We could put it on a different port, but that is not ideal.
I wanted to follow up on this request. I think it would be great to have this option, and would make it much easier to manage when deploying behind a proxy with other applications.
As always, thanks for all of your work with the platform!
Yeah, that makes sense but in my opinion this is not related to IntelOwl itself. I am trying to explain this better.
We can support that kind of deployment only if that would support a deployment mode that is integrated in IntelOwl itself. In that case, it would make sense to maintain such kind of use case. Otherwise, if this feature is useful only for an external project, adding it would make it impossible to maintain because that feature is externally dependant and does not affect IntelOwl usage in any way.
So, here I see these possibilities:
- the external project can use IntelOwl code while respecting its license and make every change that it wants in its repository to support its use case
- the external project is directly embedded in IntelOwl itself
- IntelOwl maintainers have access to the external project and vice versa so both maintainers can work and test the integration while developing the two solutions together
Which are your thoughts?
I'm not sure integrating everything into IntelOwl itself is feasible in many cases.
In the case of an enterprise, where several applications sit behind the same proxy, it would be desired to leverage the enterprise's existing web server, such as Nginx, and allow IntelOwl to be hosted behind a subpath, like /intelowl.
I would expect there are Django settings, for example, in settings.py or urls.py, that may be able to do this without much need for frontend work, but I have not tested it. These values could potentially be sourced from external variables, like those provided by Docker Compose a similar method.
https://stackoverflow.com/questions/28147916/how-to-host-a-django-project-in-a-subpath