741057228我QQ 发表于 2019-1-2 10:25:58

haproxy根据用户客户端做ACL的文件例子

  global
  log 127.0.0.1 local0
  maxconn 32768
  chroot /Data/apps/haproxy/var/chroot
  user haproxy
  group haproxy
  daemon
  nbproc 1
  pidfile /Data/apps/haproxy/haproxy.pid
  spread-checks 4
  defaults
  log global
  mode http
  retries 3
  option redispatch
  contimeout    5000
  clitimeout    50000
  srvtimeout    50000
  frontend webtest
  bind *:90
  acl agent hdr_sub(user-agent) -i MSIE 8.0
  use_backend agent_server if agent
  acl 91cpm hdr_beg(host) -i www.91cpm.com
  use_backend www.91cpm_server if 91cpm
  backend www.91cpm_server
  stats enable
  stats hide-version
  stats uri /admin?status
  stats auth admin:admin
  mode   http
  balance roundrobin
  cookie JSESSIONID prefix
  option forwardfor
  cookie SERVERID insert indirect
  option httpchk GET /
  server web01 10.2.30.79:80 cookie 23 maxconn 2048 weight 8 check port 80 inter 5000
  fall 1
  backend agent_server
  stats enable
  stats hide-version
  stats uri /admin?status
  stats auth admin:admin
  mode   http
  balance roundrobin
  cookie JSESSIONID prefix
  option forwardfor
  cookie SERVERID insert indirect
  option httpchk GET /
  server web01 10.2.30.80:80 cookie 23 maxconn 2048 weight 8 check port 80 inter 5000
  fall 1
  




页: [1]
查看完整版本: haproxy根据用户客户端做ACL的文件例子