#1110205 prosody: Allow loading non-virtual host configuration from external files

Package:
prosody
Source:
prosody
Description:
Lightweight Jabber/XMPP server
Submitter:
Elena “of Valhalla”
Date:
2025-12-04 00:21:01 UTC
Severity:
normal
#1110205#5
Date:
2025-07-31 20:59:49 UTC
From:
To:
In prosody.cfg.lua there is a line Include "conf.d/*.cfg.lua" which
allows writing some configuration in an external file instead of
chanching prosody.cfg.lua itself; however it is after the definition of
the default VirtualHost, and thus any configuration loaded from there
must either define a new VirtualHost, or will only apply to that
virtualhost.

It would be nice to have two Includes, one for the configuration, placed
before the ----------- Virtual hosts ----------- line, and another, from
a different directory, placed near the end where one can define
additional VirtualHost definitions and configurations, in a similar way
to apache's conf-* / sites-*.

I've checked https://hg.prosody.im/trunk/file/tip/prosody.cfg.lua.dist
and I believe that the Include has been added by Debian, rather than
coming from upstream (if I should have checked a different file let me
know, and I can submit the issue upstream).

Thanks in advance

#1110205#10
Date:
2025-12-04 00:11:43 UTC
From:
To:
This seems to be based on a misunderstanding. Included files start out
with their own global section, same as the main config file.

It does not matter whether an Include directive is before or after a
VirtualHost, nor is the current VirtualHost inherited into Included
files, they need their own VirtualHost directive to change that context.

Hope this helps,