10 Replies Latest reply on Nov 8, 2012 9:32 AM by georgesberscheid

    mod_cluster and virtual hosts

    georgesberscheid

      Hi,

       

      I'm having trouble setting up JBoss AS 7.1.1 with mod_cluster 1.2.0 so that I can deploy several applications into the / context-root for different virtual hosts. In my test setup I have 1 Apache httpd server and 1 JBoss AS instance.

       

      Apache config:

      CreateBalancers 0

      1 <VirtualHost *:6666> with EnableReceiveMCMP and SetHandler mod_cluster-manager

      2 <VirtualHost *:443> with ServerName host1.example.com and host2.example.com (NameVirtualHost *:443 with SNI on 1 IP adress and all the SSL stuff enabled)

       

      JBoss config:

      modcluster subsystem: proxy-list:localhost:6666

      web subsystem: http connector + 2 <virtual-server> with name=host1.example.com and name=host2.example.com

       

      Application:

      2 WARs with jboss-web.xml :

      <context-root>/<context-root> <virtual-host>host1.example.com<virtual-host>

      <context-root>/<context-root> <virtual-host>host2.example.com<virtual-host>

       

      Everything deploys fine, mod_manager shows my host that connected. However, there is only 1 Virtual Host visible in the mod_manager showing aliases host1.example.com and host2.example.com instead of having 2 Virtual hosts with 1 alias each. Since both my applications deployed on context-root / and I can't get mod_cluster to make the difference between the 2 virtual hosts, I can only access 1 application (the first one that was deployed as it seems).

       

      How do I make both virtual hosts work?

       

      Thanks a lot,
      Georges