Master : 192.168.0.26
Backup : 192.168.0.36
HAproxy : 192.168.0.50
시작하기 전에 NGINX 포트 80 말고 다른 곳으로 바꾸기(80으로 bind할 경우)
vi /etc/haproxy/haproxy.cfg
#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend test
bind *:80
default_backend test_apps
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend test_apps
balance roundrobin
server app1 192.168.0.26:80 check
server app2 192.168.0.36:80 check
vi /var/named/test.com.zone
$TTL 1D
@ IN SOA test.com. root. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns.test.com.
IN A 192.168.0.50
NS IN A 192.168.0.25
www IN A 192.168.0.50
~