7 Replies Latest reply on Mar 8, 2004 3:47 PM by Sverker Abrahamsson

    setting up virtual hosts in JBoss-3.2.3?

    Flip Newbie

      I've been trying unsuccessfully to setup five virtual hosts with jboss-3.2.3 and unfortunately everywhere I look it talks about setting up tomcat and apache. :< I just want to get JBoss to see my virtual hosts and their webapss. I've tried playing with , nodes in the jboss-service.xml, as well as include a jboss-web.xml file with the proper <context-root> and <virtual-host> nodes, but still no dice. Any help please?

        • 1. Re: setting up virtual hosts in JBoss-3.2.3?
          Flip Newbie

          Maybe something to help is I am getting this error message, but I have no idea why or what it's all about. It says something about a child and not unique, but I want to deploy the webapp to a unique virtual host.

          17:16:19,048 ERROR [MainDeployer] could not start deployment: file:/opt/jboss-3.2.3/server/default/deploy/MireilleFilion.war/
          org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (java.lang.IllegalArgumentException: addChild: Child name '' is not unique)

          • 2. Re: setting up virtual hosts in JBoss-3.2.3?
            Roy Britten Newbie

            Some questions: have you successfully deployed virtual hosts under earlier versions of JBoss? Do each of the 5 apps deploy successfully as individual applications? Which JVM are you using?

            I've tried playing with , nodes in the jboss-service.xml, as well as include a jboss-web.xml file with the proper <context-root> and <virtual-host> nodes, but still no dice


            I ran into classloader issues before I finally gave up on JBoss virtual hosting and ran separate server instances -- have you got a jboss-app.xml file in your META-INF with a <loader-repository> entry?

            • 3. Re: setting up virtual hosts in JBoss-3.2.3?
              Flip Newbie

              Howdy again. :> What do you mean by separate instances? Are they all running on the same port? I didn't think you could do that?

              • 4. Re: setting up virtual hosts in JBoss-3.2.3?
                Roy Britten Newbie

                 

                "Martin Brice" wrote:
                Howdy again. :> What do you mean by separate instances? Are they all running on the same port? I didn't think you could do that?


                Mulitple services virtual hosted on the same server instance/port got so complicated that I eventually gave up and resorted to separate JBoss instances on different ports. Our application server sits behind a reverse proxy that performs the port mapping for us. It's much easier.

                • 5. Re: setting up virtual hosts in JBoss-3.2.3?
                  Roy Britten Newbie

                   

                  "Martin Brice" wrote:
                  I was running with WebLogic 8.1 and j2sdk 1.4.2_03. I was able to get the previous virtual hosts running in WLS quite easily and was hoping it was just as easy with JBoss.


                  I'm not convinced that JBoss is quite ready for virtual hosting. There doesn't appear to be any separation of the hosts internally -- for example, the JNDI namespaces must be entirely different or there will be conflicts.

                  • 6. Re: setting up virtual hosts in JBoss-3.2.3?
                    Flip Newbie

                    That's ok for me (I think?). I'm trying to get five separate webapps going and I can't get JBoss to figure it out. Would you mind sharing/tutoring me on getting it working? Can you tell me what I need? I believe I need to play with the file in the META-INF, but I'm not sure exactly what it's supposd to be? There is a path, docbase, and appbase in and the , then there's the jboss-web.xml file for the context path, but I'm not sure if that's all there is to it?

                    PS Thanks for helping.

                    • 7. Re: setting up virtual hosts in JBoss-3.2.3?
                      Sverker Abrahamsson Novice

                      With Tomcat 4.1 you need to edit jboss-service.xml and add a host entry for each of your virtual hosts. Just copy the localhost entry and give it the name of your virtual host.

                      With Tomcat 5 it works fine to just set virtual-host in the jboss-web.xml as with Jetty.