Serve DMX from a path prefix

Refering to https://git.dmx.systems/dmx-platform/dmx-platform/issues/334 I would like to ask esp. @jri and @jpn, if setting Jetty’s context path might be a solution:

The context path is the prefix of a URL path that is used to select the web application to which an incoming request is routed. […] If there is no context path, the context is referred to as the root context. (See https://wiki.eclipse.org/Jetty/Howto/SetContextPath )

Background: On my FreedomBox, DMX is running with

Jetty 8.1.14.v20131031 at port(s) HTTP:8080 on context path /

and this configuration snippet for Apache2 (cf. this commit) :

#<Location ~ "/(systems.dmx.webclient|core|accesscontrol|workspace|topicmap)/">
<Location />

    # Configure reverse proxy paths with the URL of the Jetty server
    # dmx.websockets.port

    ProxyPass http://localhost:8080/

</Location>

But, defining my own global <Location> is only a temporary solution, if at all, as it interferes with the function of the other apps on the FreedomBox.

I have not yet managed to restrict the ProxyPass and <Location> definition to DMX only. I’ve tried using regular expressions with the <Location> Directive or a parent <VirtualHost>, but I can’t get either to work.

Thank you for the info!

Yes, setting the server-side context path will be part of the solution.
However client-side changes are required as well (see #334).
The client-side solution will involve HTML <base> element.

The “Serve DMX from a path prefix” feature will be realized in 5.0-beta-7 which is scheduled for Q1 2019.

1 Like

@jri I’m afraid this #334 feature won’t make it into DMX 5.0 final, will it?

Related to The DMX Debian Package (DMX as headless CMS on FreedomBox)

Yes, unfortunately this feature did not made it into 5.0. Other issues came up (e.g. #384, #387 and #391) and we regarded them more pressing.