Prosody: Difference between revisions

From Geitenpad
Jump to navigation Jump to search
Created page with "== ProBook 6550b == root@paardenpad:~# aptitude install prosody root@paardenpad:/etc/prosody# vim prosody.cfg.lua Disable ssl --ssl = { -- key = "/etc/prosody/cer..."
 
m 1 revision imported
 
(No difference)

Latest revision as of 14:34, 5 January 2025

ProBook 6550b

root@paardenpad:~# aptitude install prosody
root@paardenpad:/etc/prosody# vim prosody.cfg.lua 

Disable ssl

--ssl = {
--      key = "/etc/prosody/certs/localhost.key";
--      certificate = "/etc/prosody/certs/localhost.crt";
--}

Enabale bosh in enabled modules

"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"

Configureer bosh

bosh_ports = { 5280 }
bosh_max_inactivity = 60
consider_bosh_secure = true -- Use if proxying HTTPS->HTTP on the server side
cross_domain_bosh = true -- Allow access from scripts on any site with no proxy (requires a modern browser)

Add default host

http_default_host = "paardenpad.rijkenmiel.nl"
root@paardenpad:/etc/prosody/conf.avail# vim paardenpad.rijkenmiel.nl.cfg.lua
-- Section for example.com

VirtualHost "paardenpad.rijkenmiel.nl"
--      enabled = false -- Remove this line to enable this host

       -- Assign this host a certificate for TLS, otherwise it would use the one
       -- set in the global section (if any).
       -- Note that old-style SSL on port 5223 only supports one certificate, and will always
       -- use the global one.
       ssl = {
               key = "/etc/prosody/certs/localhost.key";
               certificate = "/etc/prosody/certs/localhost.cert";
               }

------ Components ------
-- You can specify components to add hosts that provide special services,
-- like multi-user conferences, and transports.
-- For more information on components, see http://prosody.im/doc/components

-- Set up a MUC (multi-user chat) room server on conference.example.com:
Component "conference.paardenpad.rijkenmiel.nl" "muc" 

-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
--Component "proxy.example.com" "proxy65"

---Set up an external component (default component port is 5347)
--Component "gateway.example.com"
--      component_secret = "password"
root@paardenpad:/etc/prosody/conf.d# ln -s ../conf.avail/paardenpad.rijkenmiel.nl.cfg.lua
root@paardenpad:/etc/prosody/conf.d# rm localhost.cfg.lua 
root@paardenpad:/etc/prosody/conf.d# cd /etc/prosody/certs/
root@paardenpdad:/etc/prosody/certs# rm localhost.*
root@paardenpdad:/etc/prosody/certs# ln -s ../../ssl/cert/paardenpad_rijkenmiel_nl.cer localhost.cert
root@paardenpdad:/etc/prosody/certs# ln -s ../../ssl/cert/paardenpad_rijkenmiel_nl.key localhost.key
root@paardenpdad:/etc/prosody/certs# cd /etc/ssl
root@paardenpdad:/etc/ssl# chgrp ssl-cert cert
root@paardenpdad:/etc/ssl# chgrp ssl-cert cert/paardenpad_rijkenmiel_nl.key
root@paardenpad:~# service prosody restart
root@paardenpad:/etc/prosody/conf.d# prosodyctl adduser rijk@paardenpad.rijkenmiel.nl
root@paardenpad:/etc/prosody/conf.d# prosodyctl adduser miel@paardenpad.rijkenmiel.nl
root@paardenpad:/etc/prosody# curl -i http://paardenpad.rijkenmiel.nl:5280/http-bind/
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 219
Content-Type: text/html
Date: Tue, 27 Oct 2015 14:49:10 GMT

<html><body>
        <p>It works! Now point your BOSH client to this URL to connect to Prosody.</p>
        <p>For more information see <a href="http://prosody.im/doc/setting_up_bosh">Prosody: Setting up BOSH</a>.</p>
        </body></html>