Running Theia web on non-root url path

I would like to run theia as a web ide, but our environment allows to run apps only on different url prefixes, no separate ports or hostnames are available. I can setup proxying either by mapping url_prefix/-> / or url_prefix/-> url_prefix/

Is it possible to run theia correctly in these conditions?

[original thread by Andrey Tatarinov]

[talsen team GmbH]

I have provided an example here: https://github.com/talsen-team/docker-app--nginx-certbot/tree/question-theia-non-root-url
You can try it and ping me if you get stuck :wink:

[Andrey Tatarinov]

So I take that theia never generates html links that refer to its path and we can just rewrite the url?

Yes, I think it was done before but with the reverse proxy. Unfortunately I don’t have an example config.

There is though this issue: https://github.com/eclipse-theia/theia/issues/7250 to allow setting the base app path in Theia since it does not seem to be possible in Express.js.

[talsen team GmbH]

This snippet should do the trick, right?

    location /non-root/ {
      proxy_pass              http://theia:3000/;
    }