A Unique Developer

Running multiple instances of RAILO on tomcat.

Month ago I wrote blog about "Installing RAILO with Tomcat" this is what I have first time installed RAILO on my PC. After getting success in that I tried to run multiple instances of RAILO for different site and even single site. Below is step by step guide to create multiple instance of RAILO.

Note: I assume that reader has already gone through my first blog on installing RAILO on Tomcat.

  1. Copy RAILO jar files into tomcat folder under "railojars".
  2. Open file and add ${catalina.home}/railojars/*.jar in common.loader (see more).
  3. Update web.xml as per explain in my first blog.
  4. Create new folder "instance1" under tomcat folder.
  5. Create bin,conf,logs,temp and webapps folder under instance1.
  6. Copy,web.xml and server.xml from tomcat/conf to instance1/conf folder.
  7. Open server.xml file and change port numbers and make sure it doesn't conflict.
  8. Open web.xml file and servlet settings explain in my first blog.
That's it and your instance is ready to go...
Create start.bat file under instance1/bin folder and following code which says to tomcat which is base file tomcat need to consider.

set "CATALINA_HOME=e:\webserver1\apache-tomcat"
set "CATALINA_BASE=e:\webserver1\apache-tomcat\instance1"

%CATALINA_HOME%\bin\catalina.bat start

Now run your bat file and you will be able to run cfm files on configured port.

Now to create another instance create new folder instance2 and copy all files from instance1. Now open server.xml and change port number and make sure doesn't conflict. Also make relevant changes in startup.bat file and run it.

Cool.. two different instances running on same computer.

Now to run single site on different instances.....

Nothing to do much just open server.xml file of both instances and configure your site as explain in my first blog.