Openfire and Jwchat on Ubuntu

May 1, 2009 at 1:28 am 2 comments

I spent a whole afternoon to install onpenfire and jwchat. This post works for me. But to apply it on Ubuntu, you need to do a little bit more.

1) install apache2, jdk, etc.
2) install openfire. I didn’t use ubuntu package since I want to do some development later. Download it and extract to any folder would work.
3) sudo a2enmod proxy; sudo a2enmod proxy_http
4) enable and setup mod_proxy. Add the following code to your <VirtualHost>. I use /etc/apache2/site-available/default
<VirtualHost *>
<Proxy *>
Order allow,deny
Allow from all
AddDefaultCharset UTF-8
ProxyPass /http-bind/
Note: Don’t try to access from browser, you will get 400 or 404. This is fine.

5) Disable SASL in Jwchat.
In jsjac.js, change the following line:
var JSJACHBC_USE_BOSH_VER  = true; // change it to false

In jwchat.html, insert
oArg.authtype = ‘nonsasl’;

6) Log into openfire console and add the following 2 server properties.
xmpp.httpbind.client.requests.polling = 0
xmpp.httpbind.client.requests.wait = 10

7) Restart openfire and run /etc/init.d/apache2 force-reload


Entry filed under: Uncategorized, Web Programming. Tags: , , .

Thread Building Block test drive Notes on gzip and DEFLATE format

2 Comments Add your own

  • 1. jack  |  May 25, 2009 at 6:50 am

    one question, is it possible to put BOSH in shared host ?

  • 2. pograph  |  May 29, 2009 at 6:03 pm

    I never tried to run it on a shared host. But I guess it is possible. They are just HTTP connections anyway. If nobody (server, firewall, client) cuts them, they should be able to live for a long time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


May 2009
« Apr   Jun »

Most Recent Posts

%d bloggers like this: