This tutorial will show you how to configure active active load balancing on CentOs 7 (Linux) using Apache.
This tutorial will also work on Redhat 7 (RHEL 7)
This tutorial will show you how to configure two CentOs web servers so you can check that your load balancing is working.
It will then show you how to configure Apache to load balance the two web servers.
The commands that you need to follow along with the tutorial are:
- sudo vi /var/www/html/index.html
- sudo firewall-cmd –zone=public –add-port=80/tcp –permanent
- sudo firewall-cmd –reload
- sudo vi /etc/httpd/conf.modules.d/00-proxy.conf
- sudo vi /etc/httpd/conf.d/default-site.conf
- sudo service httpd restart
- ifconfig
<VirtualHost *:80>
<Proxy balancer://mycluster>
BalancerMember http://Your-Ip-Address-Here:80
BalancerMember http://Your-Ip-Address-Here:80
</Proxy>
ProxyPreserveHost On
ProxyPass / balancer://mycluster/
ProxyPassReverse / balancer://mycluster/
</VirtualHost>
https://www.youtube.com/subscription_center?add_user=/UCkDvK72aPFRnv0GnpuV97ig