Customise the URL of the apps

Hi@all,

It has already been mentioned in a few posts, but I just wanted to summarise it again.

Apps like Rocket.Chat or Jitsi are accessible under their own URLs:

Jitsi: https://jitsi.[Hostname].[Subdomain].[Domain].[TLD]
Rocket.Chat: https://[hostname].[subdomain].[domain].[TLD]/rocketchat/home

In the simplest case, it’s just messy. In the other case, it prevents access.

To make my life easier, I installed the UCS environment with a subdomain [subdomain].[domain].[TLD] that is real [domain].[TLD] and over which I have control.

In order to use the external services, I created the corresponding subdomain on the external DNS server:

meet.[Domain].[TLD] → For Jitsi
chat.[Domain].[TLD] → For Rocket.Chat

I direct these subdomains to the corresponding machine using an HA proxy. In the case of Rocket.Chat, the problem is solvable. I simply call up the URL including the path from outside:

https://chat.[Domain].[TLD]/rocketchat/home

Better, of course, would be:

https://chat.[Domain].[TLD]

and you land directly on Rocket.Chat. If I call up the URL as specified, I get to the UCS administration. In the case of Jitsi, I can’t access it externally at all. Apparently because ‘jitsi’ is placed in front of the URL.

I have been looking for a solution for several days. My guess is that it can be solved with Apache-VHOST and there with mod_rewrite.

Can anyone tell me if I am in the right direction?

Unfortunately I don’t have any skills with RegEX but that is “a bit” more difficult and the fact that (I think at least) there is some kind of proxy (Apache) running between host <-> container doesn’t make it any easier :frowning:

So if someone could give me a nudge in the right direction I would be grateful. And of course, if someone of you has already solved it, I’ll gladly take more.

with best
sven

I think if you setup the outside hostname to match the inside hostname your jitsi should work. I have mine setup that way and it works fine.

If you want it to be different externally for some specific reason, my first inclination would be to look for an option in the haproxy config to rewrite the hostname so the UCS server can see the name it expects. I have used haproxy in a handful of places and it always seems to be able to do what I need, but I don’t think I’ve ever tried to rewrite the hostname, so I couldn’t say for sure that function is available.

That can’t practically work for me.

Legs external domain is example.de. This is managed by the external web server.

For the Unvivention installation I created the subdomain: intern.example.de de on the external web server.

Let’s stay with Rocket.Chat. I can install this internally only under: something.intern.example.de. Externally I can only create subdomain with: something.example.de.

How should I create them for you?

i also thought rather that this can do dre apache on the target system. But there I lack the deeper knowledge :frowning:

In the case of Rocket.Chat, I got a little further. With the following mod_rewrite:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^chat.example.com$ [NC]
RewriteRule ^/(.*)$ /rocketchat/home/ [P,L]

I can now call in the browser: chat.example.com without coming to the Univention portal of the host and landing directly in Rocket.Chat.

However, the return path in the browser is again:

https://chat.example.com/rocketchat/home

There must be a way to suppress this?

Mastodon