Skip to end of metadata
Go to start of metadata


You may have a need to run multiple instances of LAMS on one machine. This may be to run LAMS 1.0.x and LAMS 2.0, or two different LAMS 2.0 instances (e.g. two groups in your organisation want to have two completely different instances with different welcome pages, different default content, etc).

If your machine can have virtual machines, then you could run each instance of LAMS in its own virtual machine. That is outside the scope of this page.

But if you can't have virtual machines, then you will need to have two different JBoss installations on the one machine.

This is described on the JBoss Website on

Basically, to do this you can either bind each jboss instance to an IP, or configure each instance to use a different (unique) set of ports, on the same IP. In a production environment, the latter could be used with Apache/jk/rewrite.

Method 1 - Bind to IP

This works if your machine has multiple IPs. Basically instead of starting jboss with



/usr/local/jboss-4.0.2/bin/ -b

Method 2 - JBoss' Service Binding (Map Ports)

Time to configure: 5 minutes
Files modified:

  • $JBOSS_HOME/server/{new server instance}/* (just copy the default folder into a new folder)
  • $JBOSS_HOME/server/{each server instance}/conf/jboss-service.xml (modified for each instance you want to run)
  • $JBOSS_HOME/docs/examples/binding-manager/sample-bindings.xml
  • $JBOSS_HOME/server/{each server instance}/conf/login-config.xml (update the path to the lamsauthentication.xml at the bottom)

See the above JBoss Wiki page for motivation reasons and instructions.

LAMS 1.0.x

If for whatever reason you would like to run LAMS 2.0 with LAMS 1.0, you can. 1.0 uses JBoss 3.0, which has no option to bind to an IP, so you must use the second method of using different ports. Assign the default ports to LAMS 1.0, and another set to LAMS 2, as JBoss 3.0's sample-bindings.xml doesn't cover all ports that are used when it is actually run.

Notes on Using the Java Service Wrapper

In addition to the standard instructions to setup the wrapper with jboss here, do the following:

  • rename $JBOSS_HOME/conf/wrapper.conf to something like wrapper_server1.conf, and increment as necessary.
  • rename your init script (the one originally called to something more descriptive, as you'll be having one for each server instance
  • in the init script, change the name of the the wrapper.conf to match your renamed conf file above
  • pass your '-b' or '-c' parameters to by specifying it in the conf file:
  • you may also want to make each wrapper log to a different wrapper.log by modifying the wrapper.logfile parameter in each wrapper.conf