HAproxy Document
HAproxy Document. I have use 2 machine and running OS is RHEL6.4 or CentOS 6.4.64Bit Machine Details IP 192.168.0.100 Hostname node1.example.com IP 192.168.0.101 Hostname node2.example.com Virtual IP 192.168.0.200 # yun install haproxy httpd* -y (in both Machine node1 and node2) Configure httpd NODE1 # vim /etc/httpd/conf/httpd.conf Listen 192.168.0.100:8080 ServerName example.com # vim /var/www/html/index.html haproxy node1 # /etc/init.d/httpd restart # chkconfig httpd on NODE2 # vim /etc/httpd/conf/httpd.conf Listen 192.168.0.101:8080 ServerName example.com # vim /var/www/html/index.html haproxy node2 # /etc/init.d/httpd restart # chkconfig httpd on # cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg-ORG ( copy haproxy.conf file backup in both machine node1 and node2 ) configure haproxy node1 Server # vim /etc/haproxy/haproxy.cfg global log 192.168.0.200 local2 debug chroot