Skip to content
benjp edited this page Feb 5, 2013 · 7 revisions

To be sure, the Chat will never interfere with eXo Platform, you can install it on a separated server. It's of course the recommended configuration.

Step 1 : Build

Prerequisite : install Maven 3.

git clone https://github.com/exo-addons/chat-application.git
cd chat-application

then build the project with maven :

mvn clean install

Step 2 : Configure MongoDB Server

Prerequisite : install MongoDB. then configure your chat.properties file like :

dbServerHost=localhost
dbServerPort=27017
dbName=chat
dbAuthentication=false
dbUser=admin
dbPassword=pass

chatServerUrl=http://localhost:8888/chatServer
chatPortalPage=/portal/intranet/chat

You can notice here, we call Chat Server on port 8888.

Step 3 : Configure Chat Server on Tomcat

Step 3a : Configuration

Prerequisite : install Apache Tomcat 7 and rename it chat-server/

Change the conf/server.xml to port 8280 :


    <Connector port="8280" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8243" URIEncoding="UTF-8" />

    <Connector port="8209" protocol="AJP/1.3" redirectPort="8243" URIEncoding="UTF-8" />

Step 3b : Deploy

cp data/chat.properties chat-server/conf/
cp server/target/chatServer.war chat-server/webapps/

Step 3c : Run

cd chat-server
./bin/catalina.sh run

Step 4 : Deploy Chat Application

Step 4a : Deploy

Prerequisite : install eXo Platform 3.5 Tomcat bundle and rename it tomcat/

cp data/chat.properties tomcat/conf/
cp server/target/chatServer.jar tomcat/lib/
cp application/target/chat.war tomcat/webapps/

Step 4b : Run

Use eXo start script :

cd tomcat 
./start_eXo.sh

Step 5 : Virtualhosts

The Chat Application is using extensive use of Ajax calls. For this to run in multiple servers mode, the client must call the server on the same domain name and same protocol (that's the easier way to avoid anti-fishing security in modern browsers).

This easiest way to do so is to use Apache to re-route the requests using ProxyPass module.

In your Apache, configure some Proxy Pass rules, here's an example :


<VirtualHost *:8888>
  ServerName www.localhost.com

  ProxyRequests Off
  ProxyPreserveHost On

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPass /chatServer http://localhost:8280/chatServer
  ProxyPassReverse /chatServer http://localhost:8280/chatServer
  ProxyPass / http://localhost:8080/
  ProxyPassReverse / http://localhost:8080/
</VirtualHost>

Step 6 : Login

Now, point your browser to http://localhost:8888/portal/intranet/ and login with john/gtn

You will then 2 new applications you can find in the Applications section.

Clone this wiki locally