This document pretends to help the openfire admins out there that are fighting to get httpd-bind working. I’ve went thorugh that path and it was really painful, besides i’ve posted the solution in the forums but it seemed to went undercover because a lot of people keep asking the same. So i’ve recopilated the config needed and i’m publishing it here:
NOTE: This was done with enterprise version but it should work with Opensource version too, just adjust the paths.
- Copying sparkweb to an apache subdir.
cp -r /opt/openfire/plugins/enterprise/web/sparkweb /var/www/html/
2.Obtain an index.html file
Select the option that brings you the source code from the page in your browser
Copy this code and paste it in a file called index.html at your /var/www/html/sparkweb
- Modify your getConfig function within your index.html file
connectionType : “http”,
The trick is the port number. If you use anything else than 80 or 443 (both publicy accesible from outside and rarely blocked by firewalls or proxies) you’d have trouble with outside clients without complete internet access.
As apache is configured to make the proxypass or rewrite magic the bindPath line should make work sparkweb from outside.
- Crossdomain file
Note that the crossdomain file is accessible at the same site, this is needed by sparkweb
<allow-access-from domain="*" to-ports=“5222”/>
- configure your apache virtual host
CustomLog logs/ourpublichostnamesite-access_log common
ProxyPass /http-bind/ http://127.0.0.1:7070/http-bind/
ProxyPassReverse /http-bind/ http://127.0.0.1:7070/http-bind/
Allow from all
- Openfire console configuration
Enable http binding and bosch scripting and add the client requests properties to the server properties menu
- Https configuration
If you’re using 443 you should redirect to the https binding port instead. the getConfig file, also be sure that your ssl host is working ok.
- JWChat configuration
Download jwchat from sourceforge. and unpacking it in /var/www/html/jwchat
The config.js file should have this:
var SITENAME = “mychatserver”;
var BACKENDS =
The jsjacs.jsshould look like this
var JSJACHBC_USE_BOSH_VER = false;
NOTE: Not truly sure about if this is needed, but i’m putting it anyway. If you can verify if this is not really need it please say so or better yet edti the document to reflect the change.
Remove all the charset='utf-8´ instances for the jsjacs.js file.
Remove the language files not needed by your install, at the jwchat root directory.
Look in jwchat.html file the line with
and add just the oArg.authtype line just before the con.connect string. Like this:
oArg.authtype = ‘nonsasl’;
- Do further testing and it should -theoretically- work just fine
hope this helps
Andres Mauricio Mujica
This document was generated from the following thread: Openfire 3.4.5 with JWChat
This document was generated from the following thread: 3.5.0 enable http-bind?