Domain Mode w/ Dynamic Proxy Configuration
1) Copy the <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_advertise.so
, <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_manager.so
, <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_proxy_cluster.so
and <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_slotmem.so
files to the <Apache Install Dir>/modules
directory.
2) Create the <Apache Install Dir>/conf.d/mod_cluster.conf
file:
LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so MemManagerFile /var/cache/mod_cluster Listen host:6666 <VirtualHost host:6666> ServerAdvertise On EnableMCPMReceive <Location /mod_cluster-manager> SetHandler mod_cluster-manager </Location> </VirtualHost>
3) Change the configuration of the web
subsystem in the ha
and full-ha
profiles in the <JBoss EAP Install Dir>/domain/configuration/domain.xml
file:
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" instance-id="${jboss.node.name:host}" native="false"> ... </subsystem>
4) Start Apache.
5) Start JBoss EAP.
Domain Mode w/ Static Proxy Configuration
1) Copy the <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_manager.so
, <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_proxy_cluster.so
and <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_slotmem.so
files to the <Apache Install Dir>/modules
directory.
2) Create the <Apache Install Dir>/conf.d/mod_cluster.conf
file:
LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so MemManagerFile /var/cache/mod_cluster Listen host:6666 <VirtualHost host:6666> EnableMCPMReceive <Location /mod_cluster-manager> SetHandler mod_cluster-manager </Location> </VirtualHost>
3) Change the configuration of the web
subsystem in the ha
and full-ha
profiles in the <JBoss EAP Install Dir>/domain/configuration/domain.xml
file:
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" instance-id="${jboss.node.name:host}" native="false"> ... </subsystem>
4) Change the configuration of the modcluster
subsystem:
<subsystem xmlns="urn:jboss:domain:modcluster:1.1"> <mod-cluster-config advertise="false" connector="ajp" proxy-list="host:6666"> ... </mod-cluster-config> </subsystem>
5) Start Apache.
6) Start JBoss EAP.
Stand-Alone Mode w/ Dynamic Proxy Configuration
1) Copy the <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_advertise.so
, <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_manager.so
, <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_proxy_cluster.so
and <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_slotmem.so
files to the <Apache Install Dir>/modules
directory.
2) Create the <Apache Install Dir>/conf.d/mod_cluster.conf
file:
LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so MemManagerFile /var/cache/mod_cluster Listen host:6666 <VirtualHost host:6666> ServerAdvertise On EnableMCPMReceive <Location /mod_cluster-manager> SetHandler mod_cluster-manager </Location> </VirtualHost>
3) Start Apache.
4) Start JBoss EAP.
Stand-Alone Mode w/ Static Proxy Configuration
1) Copy the <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_manager.so
, <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_proxy_cluster.so
and <JBoss EAP Webserver Connector Native Install Dir>/modules/system/layers/base/native/lib64/httpd/modules/mod_slotmem.so
files to the <Apache Install Dir>/modules
directory.
2) Create the <Apache Install Dir>/conf.d/mod_cluster.conf
file:
LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so MemManagerFile /var/cache/mod_cluster Listen host:6666 <VirtualHost host:6666> EnableMCPMReceive <Location /mod_cluster-manager> SetHandler mod_cluster-manager </Location> </VirtualHost>
3) Change the configuration of the modcluster
subsystem in the <JBoss EAP Install Dir>/standalone/configuration/standalone-ha.xml
and <JBoss EAP Install Dir>/standalone/configuration/standalone-full-ha.xml
files:
<subsystem xmlns="urn:jboss:domain:modcluster:1.1"> <mod-cluster-config advertise="false" connector="ajp" proxy-list="host:6666"> ... </mod-cluster-config> </subsystem>
4) Start Apache.
5) Start JBoss EAP.
You can find more details in the Administration and Configuration Guide.
Very good article!!!
But for the mod_cluster I had to run the command
semanage port -a -t http_port_t -p udp 23364
instead since the default advertising port for mod_cluster is the 23364 and the protocol is UDP.
Otherwise I was getting the famous error during the startup of httpd:
[error] (13)Permission denied: mod_advertise: ma_group_join apr_socket_bind failed
[error] (13)Permission denied: mod_advertise: multicast join failed for 224.0.1.105:23364.