[horde] Composer installation - URL root setup

Ralf Lang ralf.lang at gmail.com
Fri May 30 04:37:00 UTC 2025


Am 15.01.2024 um 19:29 schrieb Nels Lindquist:
> I'm not sure if this is a H6 thing or a composer thing, but I'm 
> struggling to get Horde H6 set up as the Apache DocumentRoot so that 
> 'horde/' isn't part of the URI. In H5, the URI detection mechanism 
> handles this automatically.
>
> (Paths relative to composer Horde bundle root.)
>
> I've changed the virtualhost DocumentRoot to web/horde and updated the 
> value of $app_webroot in var/config/horde/registry.d/00-horde.php to 
> '/', after which the site loads and can be navigated, but none of the 
> theme elements are present.
>
> I've cleared the browser cache, restarted Apache and ran "composer 
> horde-reconfigure" without any change.
>
> With DocumentRoot set to web/ and $app_webroot set to '/horde' the 
> site loads with full theming, but requires '/horde/' in the URI.
>
> So... did I miss some Fine Manual somewhere RE: composer 
> configuration, or is it something else?

Hi Nels,

If you want apps as webroot, you have to do a little more effort.
In composer installations, apps don't live below /web/horde/ but below 
/web/.
This is similar to what we do on our official site:

bugs.horde.org -> whups
wiki.horde.org -> wicked

You need to make sure every app is web readable. You also need to make 
sure the js and themes directories are accessible through the expected 
links.
Best put a custom file in var/config/registry.d/99-custom-urls.php

<?php

// First the web dirs for the static assets
$this->applications['horde']['jsuri'] = 'https://assets.foo.org/js/horde/';
$this->applications['horde']['staticuri'] = 'https://assets.foo.org/static';
$this->applications['horde']['themesuri'] = 
'https://assets.foo.org/themes/horde/';

// Then the templates and app url
$this->applications['horde']['webroot'] = 'https://groupware.foo.org';

// Same for all apps which get their own subdomain

$this->applications['ansel']['jsuri'] = 'https://assets.foo.org/js/ansel/';
$this->applications['ansel']['themesuri'] = 
'https://assets.foo.org/themes/ansel/';
$this->applications['ansel']['webroot'] = 'https://gallery.foo.org';

$this->applications['kronolith']['jsuri'] = 
'https://assets.foo.org/js/kronolith/';
$this->applications['kronolith']['themesuri'] = 
'https://assets.foo.org/themes/kronolith/';
$this->applications['kronolith']['webroot'] = 'https://calendar.foo.org';

// Also please hardcode the path to all apps which don't get their own 
domain

$this->applications['passwd']['jsuri'] = 
'https://assets.foo.org/js/passwd/';
$this->applications['passwd']['themesuri'] = 
'https://assets.foo.org/themes/passwd/';
$this->applications['passwd']['webroot'] = 'https://apps.foo.org/passwd';

$this->applications['content']['jsuri'] = 
'https://assets.foo.org/js/content/';
$this->applications['content']['themesuri'] = 
'https://assets.foo.org/themes/content/';
$this->applications['content']['webroot'] = 'https://apps.foo.org/content';

Next you need to make sure you actually have matching DNS entries and 
vhosts in your web server pointing to these webroots.

You can mix and match every combination of stuff that has its own 
subdomain and stuff that has an explicit path below a common subdomain.
Make sure all subdomains have a common root domain and that your root 
domain is the cookie domain for your setup.

We will probably want to expand on this in the future, providing support 
for a list of distinct root domains and SOP settings. But this is not 
currently in the code while the above is demonstrated working.




More information about the horde mailing list