5 Replies Latest reply on Dec 9, 2009 10:19 AM by Henrik Aronsen

    Serving several clusters with several virtual hosts.

    Henrik Aronsen Novice


      I'm trying to serve several clusters with several virtualhost entries in one Apache instance. Here's a simplified version of the Apache config:

      Listen 7777
      <VirtualHost *.7777>
       ManagerBalancerName cluster-1
       ServerAdvertise Off # Can only exist in one virtualhost entry
      Listen 7778
      <VirtualHost *.7778>
       ManagerBalancerName cluster-2

      I set advertise to false in mod-cluster.sar/META-INF/mod-cluster-jboss-beans.xml. In the first cluster I set proxyList to webserver:7777, and on the other webserver:7778.

      The problem is that both clusters still show up in /mod_cluster_manager on both webserver:7777 and webserver:7778.

      This is fairly simple to do with a plain mod_proxy_cluster, I just define two virtualhost entries like this:

      Listen 7777
      <VirtualHost *:7777>
       <Proxy balancer://cluster-1>
       BalancerMember ajp://jboss1:8009 route=node1
       BalancerMember ajp://jboss2:8009 route=node2
       ProxyPass balancer://cluster-1/ stickySession=JSESSIONID|jsessionid
      Listen 7778
      <VirtualHost *:7778>
       <Proxy balancer://cluster-2>
       BalancerMember ajp://jboss3:8009 route=node3
       BalancerMember ajp://jboss4:8009 route=node4
       ProxyPass balancer://cluster-2/ stickySession=JSESSIONID|jsessionid

      How do I do this with mod_cluster?