ejabberd - Comments for "permanent MUC rooms only" https://www.ejabberd.im/node/3219 en Only one service per vhost https://www.ejabberd.im/node/3219#comment-53617 <div class="quote-msg"> <div class="quote-author"><em>Matt Garland</em> wrote:</div> <p>Is it possible to create 3 different conference host services?</p></div> <p>No, each vhost can only have one MUC service. Just create three rooms in it, and join the proper one in each case.</p> Wed, 01 Oct 2008 09:05:22 +0000 mfoss comment 53617 at https://www.ejabberd.im development/test/production-distinct MUC services https://www.ejabberd.im/node/3219#comment-53616 <p>Is it possible to create 3 different conference host services? I've tried like this:</p> <div class="codeblock"><code>{mod_muc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br /> &nbsp; {host, &quot;production_scenarios.@HOST@&quot;},<br /> &nbsp; {host, &quot;development_scenarios.@HOST@&quot;},<br /> &nbsp; {host, &quot;test_scenarios.@HOST@&quot;},<br /> &nbsp; {access, muc},<br /> &nbsp; {access_create, muc_admin},<br /> &nbsp; {access_persistent, muc_admin},<br /> &nbsp; {access_admin, muc_admin},<br /> {default_room_options, [<br /> {public, true},<br /> {history_size, 0},<br /> {persistent, true},<br /> {password_protected, false}<br /> ]}<br /> ]},</code></div> <p>But this does not work. Since my rails app looks at its chats table before logging into ejabberd and starts creating MUCs, it would hugely convenient if each distinct part of the app (development/test/production) was pointed at a different service. Different aspect of rails app--&gt;Different chat DB--&gt;Different MUC service--&gt;Different chats.</p> Tue, 30 Sep 2008 23:24:09 +0000 Matt Garland comment 53616 at https://www.ejabberd.im thanks again https://www.ejabberd.im/node/3219#comment-53611 <p>I never quite understood the difference between IP address and domain name. Now I know better.</p> <p>So in solo ejabberd development, you typically use the local IP address (127.0.0.1) for configuration. OR you use the production domain name, and configure your OS to point that name at the local IP.</p> Tue, 30 Sep 2008 17:14:06 +0000 Matt Garland comment 53611 at https://www.ejabberd.im Try to specify host in the Jabber client or in /etc/hosts https://www.ejabberd.im/node/3219#comment-53609 <p>Most Jabber clients (including Psi, Gajim, Tkabber...) allow you to specify the IP to connect and port. For example:</p> <ul> <li>host: 127.0.0.1 &lt;-- this is used by your client to establish the TCP connection </li><li>port: 5222 (or leave empty for default value) &lt;-- this is used by your client to establish the TCP connection </li><li>username: matt &lt;-- this is used at XMPP level to login in ejabberd </li><li>jabber server: chatisdemocracy.com &lt;-- this is used at XMPP level to login in ejabberd </li></ul> <p>Alternatively, you can add to your file /etc/hosts the line:</p> <pre> 127.0.0.1 chatisdemocracy.com </pre><p>This way your operating system will always try those IPs before asking some external DNS server.</p> <p>Once you register the domain and it points to the IP address where ejabberd listens, you don't need to specify Host in Jabber client, nor in /etc/hosts.</p> Tue, 30 Sep 2008 16:58:51 +0000 mfoss comment 53609 at https://www.ejabberd.im thanks! https://www.ejabberd.im/node/3219#comment-53604 <p>Worked like a charm. The rooms persist. I didn't understand that I was creating a "conference" service, then creating manually rooms from that service.</p> <p>I also took your advice and replaced "Pet-G5.local" with the ultimate destination of the server: "chatisdemocracy.com". Here things did not go so well. Ejabberd starts without errors, but the web admin does not come up, instead I get this error message:</p> <p>Safari can’t open the page “http://localhost:5280/admin/access/” because it can’t find the server “localhost”.</p> <p>Also the chat client fails to find it, understandably, since chatisdemocracy is just a reserved url at this point. So I'm assuming that 1) the config knows the server automatically, and 2) it uses the host "name" so that addresses with that name are routed to the server, and 3) there is some way to point the chat client and the web admin at the "local" name "chatisdemocracy.com." (chatisdemocracy.com.local does not work.)</p> <p>But I'm very stupid about networks! So all my assumptions could be wrong. </p> <p>P.S This site makes very efficient, user-friendly use of Ajax.</p> Sat, 27 Sep 2008 19:03:45 +0000 Matt Garland comment 53604 at https://www.ejabberd.im Try this example https://www.ejabberd.im/node/3219#comment-53603 <p>If I understood correctly, you have an ejabberd 2.0.2 server with the vhost "pet-g5.local". You want to have a chatroom service where only you can create and delete the rooms, and you want them to be persistent. The first rooms to have would be: "french", "german", and "english".</p> <p>Tip: instead of a local name like "pet-g5.local", you better put in ejabberd.cfg the final name you will put to your Jabber domain (maybe it will be "pet-g5.net" or similar).</p> <p>First check that you have in ejabberd.cfg all this:</p> <pre> %% Define the list of Jabber domains you want to serve in ejabberd: {hosts, ["pet-g5.local"]}. {acl, admin, {user, "matt", "pet-g5.local"}}. {access, muc_admin, [{allow, admin}]}. {modules, [ ... %% This is the definition of the chatroom service {mod_muc, [ %% The chatroom service will be "chatrooms.pet-g5.local": {host, "chatrooms.@HOST@"}, {access, muc}, {access_create, muc_admin}, {access_persistent, muc_admin}, {access_admin, muc_admin}, {default_room_options, [ {persistent, true} ]} ]}, ... ]}. </pre><p> Now start ejabberd. Since no rooms exist yet, you need to create them. Login with a Jabber client in the account "matt@pet-g5.local" (this is defined as admin of all the ejabberd server, and also admin of MUC service). It is a good idea that your client supports MUC, so you can configure the rooms.</p> <p>With your Jabber client, login to a room that you want to create (for example room name "english" in MUC service "chatrooms.pet-g5.local"), and it will be created immediately. Since you already defined the default room options, you don't need to configure the room to be persistent. Of course, maybe you want to configure the room title, etc. You can exit the room, and it should persist.</p> <p>Repeat the previous step for each room you want to create.</p> <p>Anybody can join the rooms. Only you can create, delete or configure them.</p> Sat, 27 Sep 2008 07:58:54 +0000 mfoss comment 53603 at https://www.ejabberd.im