HAproxy não está funcionando para vários sites

3

Estou tentando usar o HAproxy Loadbalancer para vários sites, mas apenas um site está funcionando para cp_nodes , quando tento acessar o segundo site ele redireciona apenas para o primeiro site.

global
   log /dev/log local0
   log /dev/log local1 notice
   chroot /var/lib/haproxy
   stats socket /run/haproxy/admin.sock mode 660 level admin
   stats timeout 30s
   user haproxy
   group haproxy
   daemon

defaults
   log global
   mode http
   option httplog
   option dontlognull
   timeout connect 5000
   timeout client 50000
   timeout server 50000

#Application Setup
frontend http_front
  bind *:80
  #redirect scheme https if !{ ssl_fc }
  stats uri /haproxy?stats
  acl cp_domains hdr(host) -i cloud.one.net
  acl admin_doamins hdr(host) -i cloud.two.net
  use_backend cp_nodes if cp_domains
  use_backend admin_nodes if admin_doamins # Not working, redirects to cp_nodes onlye 


frontend https_front
  bind *:443 ssl crt /etc/pki/cloud.pem
  stats uri /haproxy?stats
  acl cp_domains hdr(host) -i cloud.one.net
  acl admin_doamins hdr(host) -i cloud.two.net
  use_backend cp_nodes if cp_domains
  use_backend admin_nodes if admin_doamins

backend cp_nodes
  balance roundrobin
  server siteone.net 18.24.162.155:443 ssl check verify none
  server sitetwo.net 18.24.162.142:443 ssl check verify none

backend admin_nodes
  balance roundrobin
  server siteone.net:8081 18.24.162.155:8081
  server sitetwo.net:8081 18.24.162.142:8081

Arquivo de registro

Dec 27 07:37:07 lb1 haproxy[21927]: Proxy http_front started.
Dec 27 07:37:07 lb1 haproxy[21927]: Proxy https_front started.
Dec 27 07:37:07 lb1 haproxy[21927]: Proxy cp_nodes started.
Dec 27 07:37:07 lb1 haproxy[21927]: Proxy admin_nodes started.
    
por loganathan 26.12.2016 / 17:59

0 respostas

Tags