Setting things up to get strophe working

1. Install Prosody

2. Open Prosody's config file, and enable mod_bosh (search for "bosh" and uncomment it by removing from before it)

3. Create an account on Prosody, as described here: Creating accounts

4. Edit web server config as described here: Setting up BOSH: Proxying requests

5. Download strophe.js and extract it somewhere on your web server

6. The strophe examples by default connect to /xmpp-httpbind. Edit the .js files in the examples directory to change from /xmpp-httpbind to /http-bind in the first lines.

The crossdomain example requires this: Setting up BOSH: Cross-domain requests (CORS)

The prebind example requires setup described at the top in the prebind.js file

And that's it. Strophe examples should now be working without issues.

Note: Prosody by default disallows plain text passwords over non-encrypted connections. If you are using a non-default authentication backend in Prosody, you might run into this. You can use the consider_bosh_secure or allow_unencrypted_plain_auth config options, though ideally you should set up encryption (SSL BOSH port defaults to 5281, while non-SSL is 5280).

doc/strophejs.txt · Last modified: 2013/06/16 00:53 by Waqas Hussain