Multiple OpenBD installs with one jetty

This is a copy of my reply to a message on the OpenBD Mailing List, and as I think it’s a great use for others I have decided to post it on here.

If I have gotten this correct you are wanting an OpenBD JAM install and be able to run two OpenBD sites from the one ./openbdjam command

For example:

www.mysite.com
www.myothersite.com

to be severed from the same server, and same OpenBD JAM install?

If this is right, this is what you need to do to get it working:

Note – This is from a clean install

By default the webroot for the JAM install is /opt/openbdjam/webroot/ – You will need to duplicate this folder (or uploaded your own webroot containing a site), I created a webrootb folder like : /opt/openbdjam/webrootb/

Now you need to navigate to the jetty contexts folder: /opt/openbdjam/jetty/contexts/
You will see a file called webroot-context.xml here, this is the file that points to the default webroot, we need to make another one of these files (use the cp command, then we only need to edit a couple of lines), I called mine webrootb.xml

Open up webroot-context.xml and un comment the virtualHosts block and inside the < Item>< /item> Put the web address you want to use to access the site located in /opt/openbdjam/webroot/
eg. < Item>www.mysite.com< /Item>
Save and close the file

Now open the webrootb.xml file and edit the 7th line to point to the new webrootb folder, then also un comment the virtualHosts block and change the line to the web address you wish to access this OpenBD site from
eg. < Item>www.myothersite.com< /Item>
Save and close the file

Note : You need to point the A record for your domain(s) to the IP of your server

Now stop OpenBDJAM, and then start OpenBDJAM

Try and access your two sites