Here’'s the basic formula (I run all of this on the same machine)
Install Apache with mod_jk plugin
Install Tomcat
Grab JWChat bundle (jwchat-20050301.tar.gz) and HTTPBind Code (JabberHTTPBind-0.2.3.war) from http://www.strigler.de/~zeank/
Drop the war into Tomcat webapps
Config Apache (add to httpd.conf):
<VirtualHost *>
ServerName
DocumentRoot /var/www/html/jwchat/htdocs
<Directory /var/www/html/jwchat>
Options +Indexes +Multiviews
AddDefaultCharset UTF-8
- Location of the worker file
JkWorkersFile “/etc/httpd/conf/jk/workers.properties”
- Location of the log file
JkLogFile “/etc/httpd/logs/mod_jk.log”
- Log level : debug, info, error or emerg
JkLogLevel emerg
- Assign specific URL to Tomcat workers
JkMount /admin loadbalancer
JkMount /admin/* loadbalancer
JkMount /manager loadbalancer
JkMount /manager/* loadbalancer
JkMount /examples loadbalancer
JkMount /examples/* loadbalancer
JkMount /JabberHTTPBind loadbalancer
JkMount /JabberHTTPBind/* loadbalancer
Config workers.properties to point to ajp port in Tomcat
Configure the config.js file in JWChat to use binding and point to the servlet in Tomcat:
,
I think that’'s about it…works well for us.