I am working on setting up a JBoss app server on my dev platform (Ubuntu 10.04 server with JBoss 5.1) for my coldfusion apps and can’t seem to find the resources I am looking for for setting up the virtual hosts. In the past I have used tomcat which I would setup a virtual host and use the context tag to point to the root of the working directory. The directory was at /mnt/hgfs/ColdFusion/{project}/. Right at the root of the project directory was where my codebase and WEB-INF was.
I would like to setup the same thing on JBoss, but everything seems give different ways to setup the virtual host and none seem to talk about a comparison of the context tag in Tomcat.
So is there a way to do the context tag from tomcat and what is the best way to setup virtual hosts in JBoss AS 5.1?
You can setup virtual hosts just like in Tomcat (in fact JBoss Web Service is sightly modified version of Tomcat).
You can find proper in yours profile in the
deploy/jbossweb.sar/server.xml. You hvae just define in that file virtual hosts by definingHosttag.Next you have to setup your application. Just create
jboss-web.xmlfile and place it in applicationWEB-INFdirecotry. In that file you have to bind your application with proper virtual host. It can looks like that:You can find some more info in that article: Hosting Multiple Domains With JBoss
Install application from outside direcotry
You can add extra directory in which you can deploy your application (just like
deploydirectory).You have to edit
conf/bootstrap/profile.xml– you can find in your profile. Find property nameapplicationURIsand add extra dir:More info you can find here: How to deploy my application in an external directory in JBoss-5