Closed mao-liu closed 7 years ago
@ch41rmn We'd love a PR if you're willing to tackle this.
You are correct that the dashboard server is not currently relocatable under different paths. I'm pretty certain there is no major impediment preventing it, just a matter of finding all the spots that might break. The ones that come to mind are:
app.use()
calls or by defining a new root router and tacking all of the exiting paths onto it. (ref: http://bulkan-evcimen.com/using_express_router_instead_of_express_namespace.html)@jhpedemonte, @dalogsdon can you think of other spots that would need updating?
I think those mentioned by @parente are the main points.
PUBLIC_LINK_PATTERN
will need to include the prefix. See config.json. The config uses HjsonFixed by #292.
Hi,
I recently tried to collect the several web services under one Apache server, one of them is the dashboards server. Each of these services run on a different localhost port, and Apache acts as the reverse-proxy to direct different URLs to different ports based on the prefix.
e.g.
my.domain.com/jupyter --> http://127.0.0.1:9500/jupyter
, jupyter hub serving onlocalhost:9500/jupyter
my.domain.com/jenkins --> http://127.0.0.1:8080/jenkins
, jenkins serving onlocalhost:8080/jenkins
...`I cannot find a way to specify a prefix for the dashboards server. I can only get it to serve on
http://host:port
, whereas I would like to be able to serve athttp://host:port/prefix
.My initial dig into this points to some changes required in the templates, particularly the way
/css
and/components
are linked in the templates.Is this an easy thing to implement? I am not very familiar with node/express, but will be happy to have a go at a pull request.
Cheers,