0
votes

I am new at XMPP, i want to develop an instant messaging application on XMPP. I installed openfire on ubuntu server and then i use Strophe library to create connection object. But when i put JID and password in my application it send request but doesnot receive any stanza and show "200 OK" status. I use apache2 server and also add new conf file, but atlast it won't work.

1
Please show what you have done so farAnirudh Sharma
I am having access to an ubuntu server, i installed openfire on it and start openfire service, created admin account on the server, then two users. Then I download Strophe, then I open Strophe/examples/basic.js javascript code, and set 'var BOSH_SERVICE = ''xx.xx.xx.xx/http-bind'''; where 54.148.195.173 is my server IP, and open Strophe/examples/basic.html in chrome browser, and log in with one of my created user JID and Password, and I got no "RCV" in my webpageK S S
BOSH_SERVICE = ''xx.xx.xx.xx/http-bind you are missing port number 7070 if not ssl and 7443 is ssl is enabledKassav'
You can write the part of the log files under /openfire/logs/Kassav'
I have already bind port number 7070 by adding conf file in /etc/apache2/sites-available/ directory, and added following line ProxyPass /http-bind example.com:7070/http-bind ProxyPassReverse /http-bind example.com:7070/http-bindK S S

1 Answers

0
votes

After 3 days of research, I found the error: We have to go to /etc/apache2/site-available/ and modify 000-default.conf file and add following line (without double quotes) inside its tag:

"ProxyPass /http-bind http://jabber.local:7070/http-bind/"

"ProxyPassReverse /http-bind http://jabber.local:7070/http-bind/"

(Note:use your domain name or ip address instead of jabber.local)

Then Edit you javascript file and Make user BOSH url : "ip/http-bind" where ip ip corresponds to corresponding ip address of your remote server.

My mistak was that instead of modifying 000-default.conf file, i create a new conf file including this tag, and this file was not considered by my apache server since how would it know about new file, such a silly mistake, but makes a lot trouble for me.