Linux haproxy配置参数

http-request

  option http-server-close

  option http-pretend-keepalive

  option httpclose

  option redispatch

  redirect

  reqadd

  rspadd

tcp-request

 

ACL <name> <criterion> [flags] [operator] <value>

[flags] 

  -i 不区分大小写

  -f 发从制定文件种加载模式

  -- 标识符的强制结束标记

<criterion>

  be_sess_rate  用于测试指定的backend上会话创建的速率,常用于在指定backend上的会话创建速度过高时将用户请求转发至另外的backend。用于阻止攻击行为

    backend test

      mode http

      acl being_scanned be_sess_rate gt 50

      redirect location /error_pages/denied.html if being_scanned

  fe_sess_rate 用于测试指定的frontend上的会话创建速率是否满足条件,常用于为frontend指定一个合理的会话创建速率以防止服务被滥用。

    frontend mial

      bind:25

      mode tcp

      maxconn 500

      acl too_ fast fe_sess_rate gt 50

      tcp-request inspect-delay 500ms

      tcp-request content accept if ! too_fast

      tcp-request content accept if WAIT_END

  acl header_info hdr(Connection) -i close

  acl method_info method GET

  acl url_begin path_beg -i /static /images

  acl url_end path_end -i .jpg .js .css

  acl header_begin hdr_beg img. ftp.

  acl header_end hdr_end 

  acl url_begin url_beg http://

  acl url_end url_end

    

转载于:https://www.cnblogs.com/houyongchong/p/10601411.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值