码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2016-06-28 18:44:14      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:option   客户端   用户   

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


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

标签:option   客户端   用户   

原文地址:http://11003228.blog.51cto.com/10993228/1793722

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!