This tutorial is based on the original JWChat README files and it will guide you through the installation of the web-based Jabber client JWChat 1.0 beta 2 using a pre-generated package.
At the end, you will have JWChat running using ejabberd's internal HTTP Polling support. In case you, however, want to use the external component JabberHTTPBind instead, you should take a look at The odyssey of JWChat by Sabine Dinis Blochberger.
Please post a comment to this tutorial to suggest something, to report errors, or to report system and web server specific instructions. Naturally, you also can add a comment if you have questions. Further, you can ask JWChat specific questions in the chatroom jwchat@conference.jwchat.org.
Alternative: Install JWChat with ejabberd's file server
-
Configure ejabberd
Make sure you have options similar to those on your ejabberd.cfg:
{host, "jabber.mycompany.com"}. {listen, ... {5280, ejabberd_http, [http_poll]}
With these options the URL for HTTP-Poll in your server will be:
http://jabber.mycompany.com:5280/http-poll/
-
Download JWChat
Download a pre-generated package of JWChat and unpack it.
-
Configure JWChat
Edit config.js to suit your needs. You must at least set this option:
var SITENAME = "jabber.mycompany.com"
-
Copy to www
Now you can copy the JWChat directory to its final destination. On Linux it could be /var/www/jwchat/
-
Setup webserver
Now you have to setup your web server so that it redirects requests from the URL given at HTTPBASE of config.js to an HTTP-Polling capable Jabber server component. Those instructions are for Apache 2.
-
.htaccess
The easiest way to make redirection is creating a .htaccess file in the JWChat directory with this content:
AddDefaultCharset UTF-8 Options +MultiViews <IfModule mod_rewrite.c> RewriteEngine On RewriteRule http-poll/ http://jabber.mycompany.com:5280/http-poll/ [P] </IfModule>
In your Apache configuration file (/etc/apache2/apache2.conf) you must enable .htaccess files and proxy options:<Directory "/var/www/jwchat"> AllowOverride All </Directory>
Finally, enable rewrite and proxy modules for Apache:
cd /etc/apache2 ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/ ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/ ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/
-
virtual host
undocumented
Restart your web server so changes take effect:
apache2ctl restart
And now you can open your browser in the URL (maybe similar to http://www.mycompany.com/jwchat/).
-
Related Links
- SunOne works too, need reverse proxy plugin (previous iPlanet)
- IIS will work but needs ISAPI filter
help me pleaseeeeeeeeeeeeeeeeeeeeeeeeee
hello,
Ihad configured jwchat using http bind server every thing is ok
Now I want to use jwchat configured on apache2 with ejabberd.
I am using the latest versions. But when I run the jwchat page, click the login button, jwchat window opens but then a message pops out with "service not available" message.
help me please
In fact, you really don't
In fact, you really don't need to have separate web server to handle jwchat's stuff. Just use integrated ejabberd's web server module called mod_http_fileserver.
I you still want to use apache2 so please take a look at its log files somewhere in /var/log/apache2 to see what happens to requests to jwchat.
Now it works with Firefox 3 for httpbinding
I just got the newest jwchat and it's jsjac lib by cvs. I follow the instruction in README.CVS and did make and make install.
I installed a lot of perl files which are needed when I make install.
Then changed config.js file from http-poll to http-bind.
The same thing in the /extra/httpd-vhost.conf file.
Now /usr/local/etc/rc.d/apache22 restart!
Great! Now it works with Firefox 3.0. and 2.0 and IE as well!
My configuration are:
Freebsd 7.2 pre-release. Ejabberd 2.0.3. Apache 2.2. Postgresql 8.0.3. Jwchat from jwcha.org via cvs and svn its jsjac. I used Squid 3.0 to proxy Apache to make SSL work. Before, when http-polling, Apache won't work SSL.
hi if i go to
hi if i go tohttp://mire.com:5280/http-poll/ it shows me an error
Error de lectura XML: no se encuentra elementohttp://mire.com:5280/http-poll/
Ubicación:
Número de línea 1, columna 1:
whats that??
I can install a virtual server for you, you can install a proxy
I worked out a tomcat proxy which can be installed on windows and anywhere else. You can name the proxy. No body knows there is a backend ejabberd running behind. Then you can add a couple of contexts of your own.
HTTP-Polling Issues
Hello, I've installed JWChat and ejabberd with Apache 2.2, and I've been having communications issues (specifically, the ports aren't redirecting).
I've included the LoadModules for mod_proxy and mod_rewrite, and this is the .htaccess file:
AddDefaultCharset UTF-8
Options +MultiViews
RewriteEngine Onhttp://localhost:5280/http-poll/ [P]
RewriteRule http-poll/
Is there something wrong with what I have in my .htaccess file? I've already added the appropriate AllowOverride All in the apache config file.
service unavailable
Hello, I want to use jwchat configured on apache2 with ejabberd. I am using the latest versions. But when I run the jwchat page, click the login button, jwchat window opens but then a message pops out with "service not available" message. When I typehttp://myserver.com/http-bind/ it is redirected to http://myserver.com:5280/http-bind/ . This means apache2 is redirecting to http-bind of ejabberd. There is no error log in apache. Is this the problem of ejabberd.
Also if I use jwchat with the mod_http_fileserver feature of ejabberd, it is working fine.
My httpd.conf is like this
ServerName myserver.com
DocumentRoot /var/www/jwchat
Options +Indexes +MultiViews
AddDefaultCharset UTF-8http://myserver.com/http-bind/
RewriteEngine On
RewriteRule http-bind/
Please help me. Its been 3 weeks I am working for this.
Regards,
Pratik
ejabberd + Apache + JWChat
I have this same problem. I spent two weeks trying to get OpenFire to work with JWChat, and then gave up. Now I am having similar problems with ejabberd.
Ejabberd is installed and working. I can log in, create a chat room, and chat with my friends. So ejabberd appears to be working.
These both appear the same, so it seems that the Apache redirection is working correctly. However, both of these pages give me a "XML Parsing Error: no element found" message. Is that normal? I have no idea.
http://www.mortshire.org:5280/http-poll/
http://www.mortshire.org/jwc/http-poll/
I can see the JWChat login screen, BUT no matter what user name and password I use, it LOOKS like it logs me in -- but doesn't. I then get a "service unavailable" message.
I am at my wits end. I have read and read all the tutorials I can find, and nothing seems to help. I would like so much if someone who knows how all of this is SUPPOSED to work could give me a hint.
Please?
apache + ejabberd + jwchat
I have this same problem. I spent two weeks trying to get OpenFire to work with JWChat, and then gave up. Now I am having similar problems with ejabberd.
Ejabberd is installed and working. I can log in, create a chat room, and chat with my friends. So ejabberd appears to be working.
These both appear the same, so it seems that the Apache redirection is working correctly. However, both of these pages give me a "XML Parsing Error: no element found" message. Is that normal? I have no idea.
http://www.mortshire.org:5280/http-poll/
http://www.mortshire.org/jwc/http-poll/
I can see the JWChat login screen, BUT no matter what user name and password I use, it LOOKS like it logs me in -- but doesn't. I then get a "service unavailable" message.
I am at my wits end. I have read and read all the tutorials I can find, and nothing seems to help. I would like so much if someone who knows how all of this is SUPPOSED to work could give me a hint.
Please?
Hi,
I am facing the same problem as mentioned above with JWChat + ejabberd + apache
I have installed the ejabberd server and when I log-in via webadmin, it allows to be login but when I try to log-in via JWChat, it gives the error "Service unavailable".
But when I try to access the link:
http://ejabberd.oac.com:5280/http-bind/
The result comes like this:
Ejabberd mod_http_bind v1.2
An implementation of XMPP over BOSH (XEP-0206)
But when I try to use this:
http://ejabberd.oac.com:5280/http-poll/
This result comes:http://ejabberd.oac.com:5280/http-poll/
XML Parsing Error: no element found
Location:
Line Number 1, Column 1:
^
I tried to make the changes as mentioned in this url (http://www.ejabberd.im/jwchat-localserver) and after making the ejabberd changes, as I restart ejabberd server, it crashes..
I am not able to login via JWChat...
any help will be highly appreciated..
I have installed ejabberd at linux machine (fadora 8) and using the Mozila Firefox browser to run JWChat.
Bug in HTTP binding
HI,
Http binding is not working on ejabberd 2.0 .While i am trying to post the values(xml content as per BOSH standard) to ejabberd http binding port 5280,it is throwing error invalid end of statement(java socket),since through ajax it is not responding..
If i try to connect through apache proxy,then it is returning "proxy upstream server error,cannot read remote server ".!
Any guidance will be helpful for me.
http-bind works for me using this tutorial
Http binding is not working on ejabberd 2.0
I guess you mean ejabberd 2.0.0-beta1.
It works for me using this tutorial:Install JWChat with ejabberd's HTTP-Bind and file server
Thanks ! It is working fine
Hi,
Thanks for your guidance in ejabberd http binding problem.I used the tutorial that u mentioned me!
It is working fine in linux.But if i try it in windows ,i configured the docroot as D:\root...not like linux parent root ,it is throwing error while start the ejabberd server as configuartion error occured !!.
viji m
size of logs
Hello,
I would like to know if it is possible to reduce the amount of logs related to http-poll in ejabberd.
thanks in advance,
magnus
Jwchat: Adding users to roaster
It seems impossible, to add users to the roaster, if both use jwchat. The contact stays on status "stalker" even after re-auth.
Other jabbers don't seem to have this problem, as the current version has problems with ejabberd as i heard.
There is a version in CVS that corrects this bug - but i did not get it running.
Roger
The roster addition has been improved in future 1.1.2
Hello,
Improvements has been made to the way subscriptions are handled in the future 1.1.2 version. If you use SVN version, you can benefit from those improvements now.
--
Process-one
Mickaël Rémond
Hey Mickaël,When is
Hey Mickaël,
When is release of 1.1.2 planned to be?
Roger
1.1.2 will be released soon
ejabberd 1.1.2 will be ready soon.
We need more testing and feedback probably (Maybe a beta archive would help). We are also trying to fix as many bugs as possible before release.
--
Process-one
Mickaël Rémond
Problem with Jwchat on Debian
After spending hours and hours on starting up Jwchat working on Debian Etch with Apache2, I was still recieving 403 error message when I try to accesshttp://mydomain/jwchat/http-poll/ . Than I found that's caused by proxy.conf in /etc/apache2/mods-enabled/. When I removed that file and restarted Apache server, than I recieved correct answer.
403 behavior was caused by default configuration of proxy.conf. Also when I fixed this file, everything works ok.
jwchat is now packaged for Debian
jwchat is now packaged for Debian, just
apt-get install jwchat
JWChat on Debian
It worked with my Debain (Etch) installation
a more secure apache configuration?
I believe this configuration is more secure:
ProxyRequests Offhttp://unstable.nl:5280/http-poll
ProxyPass /jwchat/htdocs/http-poll/
Order deny,allow
Allow from all
Why? because it only allows one specific URL to be proxied, and doesn't make your server an OPEN PROXY. Well, I think :)
Notice that "mod_rewrite" is completely not needed anymore now.
Andreas
Different apache configuration
I had a problem with the apache configurations which I detail in this post:
http://www.ejabberd.im/node/225 (Problem setting up jwchat using http://www.ejabberd.im/jwchat)
The solution was to change the apache configuration from:
to:
Maybe its a difference between apache 1.3 and 2.0 - Not sure, but it worked.
Peter
my login button is invisible
Hi my login button is invisible mode
I Am trying many times but still its the same.
If I take out the attribute disable in the idex.html page..
it is not connecting to the server.. anybody help me about this problem..
Thanks
Have you worked out?
I have installed Ejabberd 2.0.3. I cannot make Apache-Jwchat work with it. I use ejabberdctl to register user then use psi to connect it via http-poll. It works with psi.
My apache can load jwchat html and image files. But the lights are dark. It won't turn on. I checked the log file. Everything is fine. It seems the problem is when the apache go to post to ejabberd. It got a 400 error. Seems ejabberd won't talk to Apache. All GETs are OK.
ejabberd works with psi's http-poll proxy setting up, this means ejabberd http-poll is working.
Apache can load jwchat's html files and images files, this means Apache is working.
All we have to do is to get Apache(May be our Browser) to talk to ejabberd!
Works for me too
I also have apache 2.0 and had the same problem. The above mentioned worked for me.
Must be the difference between 1.3 and 2.0
i have the same problem. my
i have the same problem. my submit button is disabled and i cant login.. but i cannot fix it with the solution above .. what else should i do.. oohh and if i go tohttp://myserver.com.co:5280/http-poll/
shows an error
Error de lectura XML: no se encuentra elementohttp://myserver.com.co:5280/http-poll/
Ubicación:
Número de línea 1, columna 1:
what should i do??
I have made it working.
But I really do not know how.
What I know your case is that the error message shown is right because you are trying to use http to poll some kind of stream data. They won't talk. It should not talk.
Any body else is misleading you guys.
Your problem is you did not get Apache work with jwchat for ejabberd.
What I did is in the httpd-vhost.conf, put something like this:
ProxyRequest offhttp://127.0.0.1:5280/http-poll http://127.0.0.1:5280/http-poll
ProxyPass /http-poll
RroxyPassReverse /http-poll
allow all
I use everything from FreeBSD 7.2.
Firefox3.0 not working though. Microsoft IE works.