13 Replies Latest reply on Apr 3, 2013 5:41 AM by Jean-Frederic Clere

    mod_cluster with multiple virtual hosts and multiple server groups

    victor213 Newbie

      I'm running mulitple virtual hosts on a web server.  Behind them is a jboss domain with multiple server groups, say exampleCluster1 and exampleCluster2.  Each server group has a different deployment. 


      This works with a single server group, exampleCluster1, but how do I configure this so that traffic to a virtual host knows which server group to go to? 





      CreateBalancers 1


          <Directory />

          Order deny,allow

          Deny from all

          Allow from 192.168.10.


        <Location /mod_cluster-manager>

          SetHandler mod_cluster-manager

          Order deny,allow

          Allow from 192.168.10.


        KeepAliveTimeout 300

        MaxKeepAliveRequests 0

        ServerAdvertise On




      example site conf:



              ServerAdmin my@email.address

              ProxyPass / balancer://mycluster stickysession=JSESSIONID|jsessionid nofailover=On

              ProxyPassReverse / balancer://mycluster

              ProxyPreserveHost On

              DocumentRoot /my/doc/root

              ServerName my.server.name

              <Directory /my/doc/root>

                      Options -FollowSymLinks -Includes -Indexes -MultiViews

                      AllowOverride None

                      Order allow,deny

                      allow from all


              ErrorLog ${APACHE_LOG_DIR}/example-error.log

              # Possible values include: debug, info, notice, warn, error, crit,

              # alert, emerg.

              LogLevel warn

             CustomLog ${APACHE_LOG_DIR}/example-access.log combined



      And I have the following full-ha profile updates:


      <subsystem xmlns="urn:jboss:domain:modcluster:1.0">

        <mod-cluster-config advertise-socket="modcluster" proxy-list="">


            <load-metric type="busyness"/>







      <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">

         <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

         <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

         <virtual-server name="default-host" enable-welcome-root="false">

            <alias name="localhost"/>

             <alias name="example.com"/>