Configure the HAProxy in CentOS 6.9 with NGINX 1.10.2

0

Hello, someone who can help me configure the HAProxy to balance the load of the servers but I can not do the load balancing, it always enters the Master Server and does not balance the load on the Backends. I add my configuration.

----- Configuration -------

global
log         127.0.0.1 local2

chroot      /var/lib/haproxy
pidfile     /var/run/haproxy.pid
maxconn     4000
user        haproxy
group       haproxy
daemon

stats socket /var/lib/haproxy/stats

defaults
mode                    http
log                     global
option                  httplog
option                  dontlognull
option http-server-close
option forwardfor       except 127.0.0.0/8
option                  redispatch
retries                 3
timeout http-request    10s
timeout queue           1m
timeout connect         10s
timeout client          1m
timeout server          1m
timeout http-keep-alive 10s
timeout check           10s
maxconn                 3000

frontend  main *:5000
acl url_static path_beg -i /static /images /javascript /stylesheets
acl url_static path_end -i .jpg .gif .png .css .js
use_backend static          if url_static
default_backend             app

backend static
balance     roundrobin
server      static 127.0.0.1:4331 check

backend app
balance     roundrobin
server  nodo1 192.168.15.126:80 check
server  nodo2 192.168.15.127:80 check
    
asked by Roderick 24.07.2018 в 20:03
source

0 answers