0 Replies Latest reply on Apr 28, 2008 4:35 PM by pascal cousson

    how can we configure virtualhost for Jboss 4.2.0 and jboss p

    pascal cousson Newbie


      we have deployed one ear application on jboss portal. This ear contains only one war.
      On jboss portal, we have created two portal instances : jbpInstance1 and jbpInstance2.

      Now, i have only one domaine : www.myDomain.com. So i can connect to each portal instance like that :


      The aim is to define two virtualhosts, one for each portal instance like that

      www.virtalhost1.com => www.myDomain.com/portal/jbpInstance1
      www.virtalhost2.com => www.myDomain.com/portal/jbpInstance2

      so, in jboss portal => server => default => deploy => jboss-web.deployer
      i have modified the server.xml file :

      1- configure on the port 80
      2- define virtualhosts :

      <Host name="mydomain.com"
      autoDeploy="false" deployOnStartup="false" deployXML="false">
      <Valve className="org.apache.catalina.valves.AccessLogValve"
      prefix="mydomain.com" suffix=".log" pattern="common"
      <DefaultContext cookies="true" crossContext="true" override="true"/>

      In the application.xml packaged in a EAR, i define the context :

      and, in the only war file in the ear, i add lines like the example below in mywebapp.war WEB-INF/jboss-web.xml file :
      <!-- Root Contest for virtual Host --->

      So, how can i define two virtualhosts with only one war in the ear ?

      Thanks you for your anwers :)