Skip to content

Instantly share code, notes, and snippets.

@sebastianwebber
Last active March 10, 2016 18:19
Show Gist options
  • Select an option

  • Save sebastianwebber/bc28e5b498c93ac63f6b to your computer and use it in GitHub Desktop.

Select an option

Save sebastianwebber/bc28e5b498c93ac63f6b to your computer and use it in GitHub Desktop.
ModCluster 1.3.1 WITH TCP on CEntOS 7x

Download httpd with mod_cluster

You can download the mod_cluster binaries on the mod_cluster website:

Install httpd packages

yum install httpd mod_ssl

Configuration

Remove proxy_balancer_module reference

Edit the /etc/httpd/conf.modules.d/00-proxy.conf file and remove (or comment) the reference below:

LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

Create config for mod_cluster module

Create a file /etc/httpd/conf.modules.d/02-modcluster.conf with:

LoadModule cluster_slotmem_module modules/mod_cluster_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

Create the mod_cluster config file

On /etc/httpd/conf.d, create a file called httpd-modcluster.conf with:

Listen *:6666
ManagerBalancerName super_name
<VirtualHost *:6666>
  <Location />
   Require ip 127.0.0 
  </Location>

  KeepAliveTimeout 300
  MaxKeepAliveRequests 0
  ServerAdvertise off
  AdvertiseFrequency 5
  EnableMCPMReceive

  <Location /mod_cluster_manager>
    SetHandler mod_cluster-manager
    Require ip 127.0.0.1
  </Location>
</VirtualHost>

Copy the library files

First, extract mod_cluster binaries on /opt:

tar xvzf mod_cluster-1.3.1.Final-linux2-x64-ssl.tar.gz -C /

Then copy the lib files:

/bin/cp -f /opt/jboss/httpd/lib/httpd/modules/mod_cluster_slotmem.so /etc/httpd/modules
/bin/cp -f /opt/jboss/httpd/lib/httpd/modules/mod_manager.so /etc/httpd/modules
/bin/cp -f /opt/jboss/httpd/lib/httpd/modules/mod_proxy_cluster.so /etc/httpd/modules
/bin/cp -f /opt/jboss/httpd/lib/httpd/modules/mod_advertise.so /etc/httpd/modules

Finishing

Restart apache:

systemctl restart httpd

Then pray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment