1 Reply Latest reply on Aug 28, 2002 2:52 PM by Uday

    Multiple Jboss instances and Apache configuartion on same ma

    Uday Newbie

      I am using Jboss3.0 with catalina(Tomcat 4.0) embedded.. We are using apache 1.3.X.
      I have to run multiple instances of jboss(tomcat) on the same machine..
      I am using VirtualHost on Apache. Also using mod_jk.c as a connector
      between Apache and Tomcat. Have set the Virtual host and all the
      relevant parameter in httpd.conf.

      I can start a new instance of jboss on same machine by configuring ports
      in different xml files. for e.g i have configured virtual host in Apache to look at
      localhost:80 and localhost:90 which should point to correct instance of jboss.
      (But how i am not sure)

      I have also changed tomcat4-service.xml for each instance to have a different
      port number for http connector and ajp13 connector. When i access App server directly
      i can connect and work on it and get right set of data.
      But when i try to connect using one of the virtualhost on apache which is not running on a
      default port ( localhost:90) the ajp13 connector connects to the another instance of
      tomcat (i.e localhost:80) .

      How do i configure multiple JVMs of Jboss+Tomcat and Apache such that a connection
      is established between intended Jboss instance and virtual host on Apache(web server)..

      Also is there a better way of running multiple instnaces of jboss on same
      machine rather than this messy approach of changing ports in xml files..


        • 1. Re: Multiple Jboss instances and Apache configuartion on sam
          Uday Newbie

          I have found the answer to this one..

          Changes to run multiple instances of Jboss need to be made in jbossmq-service.xml jboss-minimal.xml hsqldb-service.xml jboss-service.xml mssql-service.xml standardjboss.xml and tomcat4-service.xml.
          Change the port for different services like JNDI/Hyeprsonic DB etc .

          For enabling Apache to talk to correct instance of Jboss + catalina there need to be chnages done to Apache httpd.conf file and worker.properties in cataline/conf which is under jboss..

          In hhtpd.conf you can use Virtual Host capability to listen on different port for incomming request. Depending on which port the request is comming from the

          ServerAdmin webmaster@dummy-host.example.com
          DocumentRoot "c:\DDDDpplication"
          ServerName localhost
          ErrorLog logs/error_log
          JkMount /*.jsp ajp_someName
          JkMount /*.svl ajp_someName
          JkMount /appimages/* ajp_someName
          # CustomLog logs/dummy-host.example.com-access_log common

          ServerAdmin webmaster@dummy-host.example.com
          DocumentRoot "c:\Application"
          ServerName uday-eng
          ErrorLog logs/error_log
          JkMount /*.jsp ajp_someotherName
          JkMount /*.svl ajp_someotherName
          JkMount /appimages/* ajp_someotherName
          # CustomLog logs/dummy-host.example.com-access_log common

          Chnage worker.properties to



          Just specify in httpd.conf against JKMount what instance of ajp connector it is listening on..

          That would enable the request to be routed to correct Tomcat + Jboss instance from web server..