<div dir="ltr"><div>MUCkl is a web based front end to ejabberd. Why might you need something like that? Well, it's one thing to show off your XSCE/DXS and talk about collaboration. It's another thing if people can chat via your ejabberd instance from any device with a browser, including phones. A chat server isn't any fun without people on there chatting. Lowering the barrier to entry makes it easier for folks to give it a whirl and also maybe create some buzz.</div>
<div><br></div><div>The dude who coded MUCkl hasn't worked on it for a very long time, but luckily it still works and he's still hosting it at <a href="http://stefan-strigler.de/muckl/">http://stefan-strigler.de/muckl/</a> He put it up on github at <a href="https://github.com/sstrigler/MUCkl">https://github.com/sstrigler/MUCkl</a>, but it looks like it's an older version from the tarball on his site.</div>
<div><br></div><div>Of course the XSCE and DXS ejabberd installations support "regular" XMPP clients like Pidgin, Gajim, Psi, Adium, Jabiru (Android), et. al. But if some looky-loos just want to jump on ejabberd via a browser rather than futz around with configuring a client and registering a user, MUCkl is a relatively easy option.</div>
<div><br></div><div>Lemme just say it's a lot simpler to get MUCkl to work on the XSCE/DXS than it was on the XS 0.6. I recall having to enable and configure a bunch of Apache modules on the XS 0.6 (mod_proxy, mod_rewrite, etc.), but all those are already set up by default on the XSCE/DXS.</div>
<div><br></div><div>Note - It's very possible you might screw up ejabberd doing this, so be very careful. And read all the instructions below before you haul off and do anything. And for goodness sakes, do not do this on a mission critical production machine, at least not for your first go round. Enough warning? Let's get to it.</div>
<div><br></div><div>Enable http_bind in /etc/ejabberd/<a href="http://ejabberd-xs.cfg.in">ejabberd-xs.cfg.in</a>:</div><div><br></div><div>Look for where port 5280 is defined and add http_bind as shown below. Warning: if you misplace a comma, or even sneeze while editing this config file, ejabberd won't start back up.</div>
<div><br></div><div> , {5280, ejabberd_http, [</div><div> inet6,</div><div> <span class="" style="white-space:pre"> </span> http_poll,</div><div><span class="" style="white-space:pre"> </span> http_bind, </div>
<div> <span class="" style="white-space:pre"> </span> web_admin</div><div> <span class="" style="white-space:pre"> </span>]}</div><div><br></div><div>Still in /etc/ejabberd/<a href="http://ejabberd-xs.cfg.in">ejabberd-xs.cfg.in</a>, and near the bottom of the file, look for the MODULES section. Stick mod_http_bind in there as shown below. Again, be careful with the brackets and commas, the ejabberd config file is touchy.</div>
<div><br></div><div> {mod_vcard, []},</div><div> {mod_http_bind, []},</div><div> {mod_version, []}</div><div> ]}.</div><div><br></div><div>Do xs-domain-config to write the changes to ejabberd-xs.cfg.</div><div><br>
</div><div>Throw muckl.conf into /etc/httpd/conf.d. Here's what I'm using, per cat /etc/httpd/conf.d/muckl.conf:</div><div><br></div><div>AddDefaultCharset UTF-8</div><div>Options +Multiviews</div><div>ProxyRequests Off</div>
<div>RewriteEngine On</div><div>RewriteRule ^/http-bind/ <a href="http://localhost:5280/http-bind/">http://localhost:5280/http-bind/</a> [P]</div><div><br></div><div>Restart ejabberd and apache (note - ejabberd might take a minute or so to fully restart):</div>
<div>ejabberdctl restart</div><div>systemctl restart httpd.service</div><div><br></div><div>At this point, go to <a href="http://schoolserver.local:5280/http-bind/">http://schoolserver.local:5280/http-bind/</a> and you should see this:</div>
<div><br></div><div>ejabberd mod_http_bind</div><div>An implementation of XMPP over BOSH (XEP-0206)</div><div>This web page is only informative. To use HTTP-Bind you need a Jabber/XMPP client that supports it.</div><div><br>
</div><div>If you get a 404 on <a href="http://schoolserver.local:5280/http-bind/">http://schoolserver.local:5280/http-bind/</a>, see if a reboot helps. MUCkl will not work if http-bind doesn't.</div><div><br></div><div>
Create the muckl user:</div><div>-bash-4.2# ejabberdctl register muckl schoolserver.local 12muckl</div><div>User muckl@schoolserver.local successfully registered</div><div><br></div><div>You can also create the muckl user via Pidgin. During XSCE/DXS testing, sometimes it's helpful to be logged into ejabberd via Pidgin (or any "real" XMPP client) so you can see (and hear) when ejabberd clients come online.</div>
<div><br></div><div><a href="http://wiki.laptop.org/go/XS_Community_Edition/0.4/Testing#Using_Pidgin_to_Monitor_Ejabberd">http://wiki.laptop.org/go/XS_Community_Edition/0.4/Testing#Using_Pidgin_to_Monitor_Ejabberd</a></div>
<div><br></div><div>Create a persistent chatroom:</div><div>I usually use Pidgin for this. Once I'm logged in, it's a few steps.</div><div>1. Go to Buddies -> Join a Chat...</div><div>2. In the Room field, enter a chatroom name. I usually just use "chat" for the room name. Click "Join."</div>
<div>3. A "Create New Room" box should pop up. Click "Configure Room."</div><div>4. Click the tickbox next to "Make Room Persistent" and that's it. Click "OK" and you'll join that room.</div>
<div>5. You don't have to stay in that room, exit out of it if you like. You can always rejoin later.</div><div><br></div><div>Download the MUCkl tarball into the webserver root.</div><div><br></div><div>cd /var/www/html</div>
<div>wget <a href="http://stefan-strigler.de/download/muckl-0.4.4.tar.gz">http://stefan-strigler.de/download/muckl-0.4.4.tar.gz</a></div><div><br></div><div>Unpack it and rename the dir muckl or chat or whatever. Remember this is what users will navigate to in their browsers, so keep it simple. You want to be able to tell users an easy, memorable URL, like <a href="http://schoolserver/chat">http://schoolserver/chat</a>.</div>
<div><br></div><div>Inside the muckl or chat dir, whatever you named it, create .htaccess:</div><div><br></div><div>AddDefaultCharset UTF-8</div><div> Options +MultiViews</div><div><IfModule mod_rewrite.c></div><div>
RewriteEngine On</div><div>RewriteRule http-bind/ <a href="http://localhost:5280/http-bind/">http://localhost:5280/http-bind/</a> [P]</div><div></IfModule></div><div><br></div><div>Edit config.js. I hope diff'ing the config.js I'm using compared to what it shipped with is instructive enough.</div>
<div><br></div><div>diff config.js config.js.bak </div><div>31c31</div><div>< var BACKENDTYPE = 'binding';</div><div>---</div><div>> var BACKENDTYPE = 'polling';</div><div>44c44</div><div>< var HTTPBASE = "/http-bind/";</div>
<div>---</div><div>> var HTTPBASE = "/http-poll/";</div><div>51c51</div><div>< var XMPPDOMAIN = "schoolserver.local"; // domain name of jabber service to be used</div><div>---</div><div>> var XMPPDOMAIN = "localhost"; // domain name of jabber service to be used</div>
<div>57c57</div><div>< var MUCKLPASS = "12muckl"; // password</div><div>---</div><div>> var MUCKLPASS = "muckl"; // password</div><div>69,71c69,71</div><div>< name:'chat',</div>
<div>< description:'Welcome to the XSCE chat server',</div><div>< server:'conference.schoolserver.local'//,</div><div>---</div><div>> name:'test',</div>
<div>> description:'some room for testing',</div><div>> server:'conference.localhost'//,</div><div><br></div><div>If it's being hosted on an XO, I would recommend this additional edit to config.js, from "false" to "true" Otherwise it can take a long time to feed the chat scrollback to the web clients.</div>
<div> </div><div>/* CONFERENCENOHIST</div><div> * whether to not show room history upon joining</div><div> */</div><div>var CONFERENCENOHIST = true;</div><div><br></div><div>This isn't necessary, but it can speed things up a little bit, so I prefer to get rid of the background image by commenting this line out in muckl.css:</div>
<div>#<span class="" style="white-space:pre"> </span>background: url(images/mucklbg.jpg) repeat;</div><div><br></div><div>After all this, any user from any browser on most every platform or device, if they're able to hit the XSCE/DXS's Apache server whatsoever, should be able to go to <a href="http://schoolserver/chat">http://schoolserver/chat</a>, or even just the LAN IP, my local example is <a href="http://192.168.1.7/chat">http://192.168.1.7/chat</a>. Then enter a nick, hit enter, and gossip on the ejabberd server.</div>
<div><br></div><div>Anna Schoolfield</div><div>Birmingham</div></div>