[jboss-user] [JBoss Portal] - how can we configure virtualhost for Jboss 4.2.0 and jboss p

pasc_dev do-not-reply at jboss.com
Mon Apr 28 16:35:05 EDT 2008


Hello,

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 : 

www.myDomain.com/portal/jbpInstance1
www.myDomain.com/portal/jbpInstance2

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">
  | <Alias>www.mydomain.com</Alias>
  | 
  | <Valve className="org.apache.catalina.valves.AccessLogValve"
  | prefix="mydomain.com" suffix=".log" pattern="common"
  | directory="${jboss.server.home.dir}/log"/>
  | 
  | <DefaultContext cookies="true" crossContext="true" override="true"/>
  | </Host>
  | 

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

  | <web-uri>mywebapp.war</web-uri>
  | <context-root>/</context-root>
  | 

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 :

  | <jboss-web>
  | <!-- Root Contest for virtual Host --->
  | <context-root>/</context-root>
  | <virtual-host>mydomain.com</virtual-host>
  | </jboss-web>  
  | 

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


Thanks you for your anwers :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147356#4147356

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147356



More information about the jboss-user mailing list