Jump to content

Prosody/prosody-virtualhost.cfg.lua

From MattWiki

Below is the VirtualHost configuration or prosody.<syntaxhighlight lang="lua">


-- example.com VirtualHost XMPP Service --


VirtualHost "example.com"

       enabled = true
       ssl = {
               key = "/etc/prosody/certs/example.com/privkey.pem";
               certificate = "/etc/prosody/certs/example.com/fullchain.pem";
               protocol = "tlsv1_1+";
       }
       archive_expires_after = "90d"; -- 90 days
       default_storage = "sql";
       sql = { driver = "SQLite3", database = "example_com.sqlite" };

Component "upload.example.com" "http_upload"

       http_external_url = "https://upload.example.com/";
       http_upload_expire_after = 60 * 60 * 24 * 7; -- 1 week in seconds
       default_storage = "sql";
       sql = { driver = "SQLite3", database = "upload_example_com.sqlite" };
       ssl = {
               certificate = "/etc/prosody/certs/im.example.com/fullchain.pem";
               key = "/etc/prosody/certs/im.example.com/privkey.pem";
       }

Component "proxy.example.com" "proxy65"

       proxy65_address = "proxy.example.com";
       proxy65_acl = { "example.com" };
       ssl = {
               certificate = "/etc/prosody/certs/im.example.com/fullchain.pem";
               key = "/etc/prosody/certs/im.example.com/privkey.pem";
       }

Component "pubsub.example.com" "pubsub"

       ssl = {
               certificate = "/etc/prosody/certs/im.example.com/fullchain.pem";
               key = "/etc/prosody/certs/im.example.com/privkey.pem";
       }

Component "conference.example.com" "muc"

       name = "The example.com chatrooms server";
       http_external_url = "https://conference.example.com/";
       default_storage = "sql"
       sql = { driver = "SQLite3", database = "muc_example_com.sqlite" };
       ssl = {
               certificate = "/etc/prosody/certs/im.example.com/fullchain.pem";
               key = "/etc/prosody/certs/im.example.com/privkey.pem";
       }
       restrict_room_creation = false;
       modules_enabled = {
               "pastebin";
               "mam_muc";
               "muc_log";
               "muc_log_http";
       }
       pastebin_expire_after = 0; -- In hours, 0 (zero) stores to disk
       max_history_messages = 500;
       muc_log_http = {
               url_base = "log";
       }

</syntaxhighlight>