19.3.2. Настройка XMPP-сервера (prosody)
Создать каталог
/etc/prosody/conf.d
для хранения пользовательских конфигураций:
# mkdir -p /etc/prosody/conf.d
В конец файла
/etc/prosody/prosody.cfg.lua
дописать строку:
Include "conf.d/*.cfg.lua"
Создать конфигурационный файл prosody для вашего домена (например,
/etc/prosody/conf.d/jitsi2.test.alt.cfg.lua
) со следующим содержимым:
plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }
-- domain mapper options, must at least have domain base set to use the mapper
muc_mapper_domain_base = "jitsi2.test.alt";
cross_domain_bosh = false;
consider_bosh_secure = true;
----------- Virtual hosts -----------
VirtualHost "jitsi2.test.alt"
authentication = "anonymous"
ssl = {
key = "/var/lib/prosody/jitsi2.test.alt.key";
certificate = "/var/lib/prosody/jitsi2.test.alt.crt";
}
speakerstats_component = "speakerstats.jitsi2.test.alt"
conference_duration_component = "conferenceduration.jitsi2.test.alt"
-- we need bosh
modules_enabled = {
"bosh";
"pubsub";
"ping"; -- Enable mod_ping
"speakerstats";
"turncredentials";
"conference_duration";
}
c2s_require_encryption = false
Component "conference.jitsi2.test.alt" "muc"
storage = "memory"
modules_enabled = {
"muc_meeting_id";
"muc_domain_mapper";
-- "token_verification";
}
admins = { "focus@auth.jitsi2.test.alt" }
muc_room_locking = false
muc_room_default_public_jids = true
VirtualHost "auth.jitsi2.test.alt"
ssl = {
key = "/var/lib/prosody/auth.jitsi2.test.alt.key";
certificate = "/var/lib/prosody/auth.jitsi2.test.alt.crt";
}
authentication = "internal_plain"
-- internal muc component, meant to enable pools of jibri and jigasi clients
Component "internal.auth.jitsi2.test.alt" "muc"
storage = "memory"
modules_enabled = {
"ping";
}
admins = { "focus@auth.jitsi2.test.alt", "jvb@auth.jitsi2.test.alt" }
muc_room_locking = false
muc_room_default_public_jids = true
Component "focus.jitsi2.test.alt"
component_secret = "secret1" -- достаточно длинный пароль, он же JICOFO_SECRET
Component "speakerstats.jitsi2.test.alt" "speakerstats_component"
muc_component = "conference.jitsi2.test.alt"
Component "conferenceduration.jitsi2.test.alt" "conference_duration_component"
muc_component = "conference.jitsi2.test.alt"
Сгенерировать сертификаты для виртуальных хостов jitsi2.test.alt и auth.jitsi2.test.alt:
# prosodyctl cert generate jitsi2.test.alt
# prosodyctl cert generate auth.jitsi2.test.alt
Зарегистрировать сертификаты в системе, как доверенные (сертификаты нужно регистрировать там, где устанавливается Jicofo):
# ln -s /var/lib/prosody/jitsi2.test.alt.crt /etc/pki/ca-trust/source/anchors/
# ln -s /var/lib/prosody/auth.jitsi2.test.alt.crt /etc/pki/ca-trust/source/anchors/
# update-ca-trust
Зарегистрировать пользователя focus (аккаунт focus@auth.jitsi2.test.alt):
# prosodyctl register focus auth.jitsi2.test.alt secret2
где secret2 — достаточно длинный пароль.
Запустить prosody:
# prosodyctl start