mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Setup XMPP components for each domain, not only the main domain.
This commit is contained in:
parent
22b9565eb7
commit
748dcfd8c5
4 changed files with 67 additions and 60 deletions
|
@ -48,11 +48,11 @@ do_post_regen() {
|
||||||
# create metronome directories for domains
|
# create metronome directories for domains
|
||||||
for domain in $domain_list; do
|
for domain in $domain_list; do
|
||||||
mkdir -p "/var/lib/metronome/${domain//./%2e}/pep"
|
mkdir -p "/var/lib/metronome/${domain//./%2e}/pep"
|
||||||
done
|
|
||||||
# http_upload directory must be writable by metronome and readable by nginx
|
# http_upload directory must be writable by metronome and readable by nginx
|
||||||
mkdir -p "/var/xmpp-upload/${main_domain}/upload"
|
mkdir -p "/var/xmpp-upload/${domain}/upload"
|
||||||
chmod g+s "/var/xmpp-upload/${main_domain}/upload"
|
chmod g+s "/var/xmpp-upload/${domain}/upload"
|
||||||
chown -R metronome:www-data "/var/xmpp-upload/${main_domain}"
|
chown -R metronome:www-data "/var/xmpp-upload/${domain}"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
# fix some permissions
|
# fix some permissions
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
VirtualHost "{{ domain }}"
|
VirtualHost "{{ domain }}"
|
||||||
|
enable = true
|
||||||
ssl = {
|
ssl = {
|
||||||
key = "/etc/yunohost/certs/{{ domain }}/key.pem";
|
key = "/etc/yunohost/certs/{{ domain }}/key.pem";
|
||||||
certificate = "/etc/yunohost/certs/{{ domain }}/crt.pem";
|
certificate = "/etc/yunohost/certs/{{ domain }}/crt.pem";
|
||||||
|
@ -13,3 +14,58 @@ VirtualHost "{{ domain }}"
|
||||||
namefield = "cn",
|
namefield = "cn",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Discovery items
|
||||||
|
disco_items = {
|
||||||
|
{ "muc.{{ domain }}" },
|
||||||
|
{ "pubsub.{{ domain }}" },
|
||||||
|
{ "jabber.{{ domain }}" },
|
||||||
|
{ "vjud.{{ domain }}" },
|
||||||
|
{ "xmpp-upload.{{ domain }}" },
|
||||||
|
};
|
||||||
|
|
||||||
|
-- contact_info = {
|
||||||
|
-- abuse = { "mailto:abuse@{{ domain }}", "xmpp:admin@{{ domain }}" };
|
||||||
|
-- admin = { "mailto:root@{{ domain }}", "xmpp:admin@{{ domain }}" };
|
||||||
|
-- };
|
||||||
|
|
||||||
|
------ Components ------
|
||||||
|
-- You can specify components to add hosts that provide special services,
|
||||||
|
-- like multi-user conferences, and transports.
|
||||||
|
|
||||||
|
---Set up a MUC (multi-user chat) room server
|
||||||
|
Component "muc.{{ domain }}" "muc"
|
||||||
|
name = "{{ domain }} Chatrooms"
|
||||||
|
|
||||||
|
modules_enabled = {
|
||||||
|
"muc_limits";
|
||||||
|
"muc_log";
|
||||||
|
"muc_log_mam";
|
||||||
|
"muc_log_http";
|
||||||
|
"muc_vcard";
|
||||||
|
}
|
||||||
|
|
||||||
|
muc_event_rate = 0.5
|
||||||
|
muc_burst_factor = 10
|
||||||
|
|
||||||
|
---Set up a PubSub server
|
||||||
|
Component "pubsub.{{ domain }}" "pubsub"
|
||||||
|
name = "{{ domain }} Publish/Subscribe"
|
||||||
|
|
||||||
|
unrestricted_node_creation = true -- Anyone can create a PubSub node (from any server)
|
||||||
|
|
||||||
|
---Set up a HTTP Upload service
|
||||||
|
Component "xmpp-upload.{{ domain }}" "http_upload"
|
||||||
|
name = "{{ domain }} Sharing Service"
|
||||||
|
|
||||||
|
http_file_path = "/var/xmpp-upload/{{ domain }}/upload"
|
||||||
|
http_external_url = "https://xmpp-upload.{{ domain }}:443"
|
||||||
|
http_file_base_path = "/upload"
|
||||||
|
http_file_size_limit = 6*1024*1024
|
||||||
|
http_file_quota = 60*1024*1024
|
||||||
|
http_upload_file_size_limit = 100 * 1024 * 1024 -- bytes
|
||||||
|
http_upload_quota = 10 * 1024 * 1024 * 1024 -- bytes
|
||||||
|
|
||||||
|
---Set up a VJUD service
|
||||||
|
Component "vjud.{{ domain }}" "vjud"
|
||||||
|
vjud_disco_name = "{{ domain }} User Directory"
|
||||||
|
|
|
@ -81,14 +81,6 @@ http_interfaces = { "127.0.0.1", "::1" }
|
||||||
-- Enable IPv6
|
-- Enable IPv6
|
||||||
use_ipv6 = true
|
use_ipv6 = true
|
||||||
|
|
||||||
-- Discovery items
|
|
||||||
disco_items = {
|
|
||||||
{ "muc.{{ main_domain }}" },
|
|
||||||
{ "pubsub.{{ main_domain }}" },
|
|
||||||
{ "xmpp-upload.{{ main_domain }}" },
|
|
||||||
{ "vjud.{{ main_domain }}" }
|
|
||||||
};
|
|
||||||
|
|
||||||
-- BOSH configuration (mod_bosh)
|
-- BOSH configuration (mod_bosh)
|
||||||
consider_bosh_secure = true
|
consider_bosh_secure = true
|
||||||
cross_domain_bosh = true
|
cross_domain_bosh = true
|
||||||
|
@ -119,45 +111,6 @@ log = {
|
||||||
Component "localhost" "http"
|
Component "localhost" "http"
|
||||||
modules_enabled = { "bosh" }
|
modules_enabled = { "bosh" }
|
||||||
|
|
||||||
---Set up a MUC (multi-user chat) room server
|
|
||||||
Component "muc.{{ main_domain }}" "muc"
|
|
||||||
name = "{{ main_domain }} Chatrooms"
|
|
||||||
|
|
||||||
modules_enabled = {
|
|
||||||
"muc_limits";
|
|
||||||
"muc_log";
|
|
||||||
"muc_log_mam";
|
|
||||||
"muc_log_http";
|
|
||||||
"muc_vcard";
|
|
||||||
}
|
|
||||||
|
|
||||||
muc_event_rate = 0.5
|
|
||||||
muc_burst_factor = 10
|
|
||||||
|
|
||||||
---Set up a PubSub server
|
|
||||||
Component "pubsub.{{ main_domain }}" "pubsub"
|
|
||||||
name = "{{ main_domain }} Publish/Subscribe"
|
|
||||||
|
|
||||||
unrestricted_node_creation = true -- Anyone can create a PubSub node (from any server)
|
|
||||||
|
|
||||||
---Set up a HTTP Upload service
|
|
||||||
Component "xmpp-upload.{{ main_domain }}" "http_upload"
|
|
||||||
name = "{{ main_domain }} Sharing Service"
|
|
||||||
|
|
||||||
http_file_path = "/var/xmpp-upload/{{ main_domain }}/upload"
|
|
||||||
http_external_url = "https://xmpp-upload.{{ main_domain }}:443"
|
|
||||||
http_file_base_path = "/upload"
|
|
||||||
http_file_size_limit = 6*1024*1024
|
|
||||||
http_file_quota = 60*1024*1024
|
|
||||||
http_upload_file_size_limit = 100 * 1024 * 1024 -- bytes
|
|
||||||
http_upload_quota = 10 * 1024 * 1024 * 1024 -- bytes
|
|
||||||
|
|
||||||
|
|
||||||
---Set up a VJUD service
|
|
||||||
Component "vjud.{{ main_domain }}" "vjud"
|
|
||||||
ud_disco_name = "{{ main_domain }} User Directory"
|
|
||||||
|
|
||||||
|
|
||||||
----------- Virtual hosts -----------
|
----------- Virtual hosts -----------
|
||||||
-- You need to add a VirtualHost entry for each domain you wish Metronome to serve.
|
-- You need to add a VirtualHost entry for each domain you wish Metronome to serve.
|
||||||
-- Settings under each VirtualHost entry apply *only* to that host.
|
-- Settings under each VirtualHost entry apply *only* to that host.
|
||||||
|
|
|
@ -639,8 +639,6 @@ def _prepare_certificate_signing_request(domain, key_file, output_folder):
|
||||||
# Set the domain
|
# Set the domain
|
||||||
csr.get_subject().CN = domain
|
csr.get_subject().CN = domain
|
||||||
|
|
||||||
from yunohost.domain import _get_maindomain
|
|
||||||
if domain == _get_maindomain():
|
|
||||||
# Include xmpp-upload subdomain in subject alternate names
|
# Include xmpp-upload subdomain in subject alternate names
|
||||||
subdomain="xmpp-upload." + domain
|
subdomain="xmpp-upload." + domain
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue