Subdomain directly to UniventionApplication

Hello together,

i´ve tryed to get a subdomain linkes to the HordeMailer.
Everything is running correct the only thing what i want to do is to link a subdomain directly to the horde webmailer.

For example mail.example.com to horde webmailer.

In front a new nginx SslWebProxy is running for all other things is runs fine.

mail.example.com thorws me to mail.example.com/univention/portal/

If i tryed to remask to mail.example.com/horde it bunces an error

Path not found mail.example.com/horde/horde/login.php.

Why apache2 trys to redirect me from horde to horde/horde?

I hope someone can help me a little bit with this issue.

Maybe the same issue with nextcloud and cloud,example.com

Thanks

Hi,

I am not sure if you mix things here…

A subdomain is part of a DNS database which contains hosts (ie host1.mail.example.com, host2.exeample.com).
You can redirect hostnames.
You can redirect URLs.

All three does not necessarily interact with each other.

Am I right you want people trying to access http://mail.example.com being redirected to http://mail.example.com/horde/login.php, correct?
And your hat already setup mail.example.com (meaning the hostname properly resolves to the correct IP)?

I will just tell you the predefined possibilities UCS offers, decide on your own which one to use:

  1. Starting Page
    You can redirect the starting page ie. to the Horde login page by using the ucr variable. Check here.
  2. Portal Entry
    You can add an entry for Horde on the Portal landing page of Univention. Check docs.
  3. Add Apache Virtual Host with a redirected hostname (CNAME)
    You can add another virtual host to Apache. Adopt the hints from here for your needs and configure your hostname “mail.example.com” to point to your Horde host.

Hope it helps

/CV

Thanks Christian for your response.

I tryed the third method.

For clearance:

Internet
|
-> mail.example.com
|
Nginx SSL Proxy (192.168.0.102)
|
->redirect to 192.168.0.210
|
Univention (192.168.0.210)
|
HordeWebMailer (Docker --> 192.168.0.210:40001/horde)

SSL Proxy runs fine for every other Service.
The configuration should be only on the ssl Proxy if possible
Example for nginx server block mail.example.com:

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://192.168.0.210;
proxy_read_timeout 90;
proxy_redirect https://192.168.0.210 https://mail.example.com;
}

This redirect me as expected to the Portal.
When i try to modify

proxy_pass https://192.168.0.210/horde;
proxy_read_timeout 90;
proxy_redirect https://192.168.0.210/horde https://mail.example.com;

an error occurs /hordehorde/login.php does not exist.

After that i try to create a apache2 vhost on Univenetion but no success.
Maybe someone has a hint on configuration for a univention docker app.

Greetings
Martin

Hi @topsecret,

you don’t need proxy_redirect. all you need to set is explained in https://serverfault.com/a/792343/152358

Mastodon