Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[production_web_proxying.xml]: proxying multiple instances with arbitary URLs including admin tools (dashboard, package manager) etc. #568

Open
jbiermann opened this issue Feb 1, 2021 · 2 comments

Comments

@jbiermann
Copy link

Describe the problem
The proxying document describes on how to setup a reverse proxy for individual exist applications. I really miss a note on how to proxy the dashboard in production_web_proxying.xml.
The simplest solution is to proxy all request from /exist to the exist db installation, e.g.
ProxyPass /exist/ http://localhost:8088/exist/
ProxyPassReverse /exist/ http://localhost:8088/exist/
You can't choose other URLs than /exist because the dashboard and all apps inside the dashboard make requests to /exist.

Note that you can setup any server related authentication for this path for security, this is left out in this ticket here, but a warning to secure this resource should be added.

On a single instance installation this works fine. But for my development servers I often run several exist instances on one machine and proxy them behind a HTTP server. I change the HTTP port from Jetty for each instance(from $EXIST_HOME/etc/jetty/jetty-http.xml).
Now here comes the problem for the dashboard related items. Since every admin tool makes requests to /exist I can only proxy one instance with the dashboard and admin tools.

Solution

Edit $EXIST_HOME/etc/jetty/webapps/exist-webapp-context.xml and change
<Set name="contextPath">/exist</Set>
to any context URL you want, for example here we set rc1:
<Set name="contextPath">/rc1</Set

Now you can do the reverse proxy for this example above:
ProxyPass /rc1/ http://localhost:8088/rc1/
ProxyPassReverse /rc1/ http://localhost:8088/rc1/

So you can have multiple exist instances running and access the dashboard on all of them.

There is still a small bug in the dasboard: if you click on the log in link and send the form, it will still send the request to /exist. The URL is hard coded.

Dashboard login URL fix
Open eXide and open the resource
/db/apps/dashboard/bower_components/existdb-launcher/existdb-login.html
Change the URL in the line
<iron-ajax id="checkLogin" url="/exist/apps/dashboard/login" ...>
to the context path you have choosen.
This looks similar to the Bug Dashboard Bug #73, but the solution posted there did not work for me.

It would be great if the documentation could be extended to include this information.

Please provide the following

  • exist-db version: 5.2.0
  • documentation version: 5.2.0
@welcome
Copy link

welcome bot commented Feb 1, 2021

Thanks for opening your first issue here! Be sure to follow the issue template!

@Humboldt-Repository
Copy link

@jbiermann Many thanks!! This must be included in the documentation....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants