acl             url_web_wwm             path_beg                -i                      /scan
use_backend zjtest7_com if url_web_wwm acl url_static path_end .html .gif .png .jpg .css .js
use_backend api_zjtest7_com if url_static backend zjtest7_com
mode http
server apphost_1 192.168.32.101:3000 check inter 2000 fall 3 backend api_zjtest7_com
mode http
server apphost_1 192.168.32.76:80 check inter 2000 fall 3 backend image_zjtest7_com
mode http
server apphost_1 192.168.32.61:80 check inter 2000 fall 3 其中 zjtest7.com 和api.zjtest7.com 都指向到haproxy zjtest7-haproxy:/root# curl zjtest7.com/scan 此时发送到 zjtest7_com 而不会发送到 api_zjtest7_com zjtest7-haproxy:/root# curl api.zjtest7.com/scan/index.html zjtest7-haproxy:/root# curl zjtest7.com/scan/test
welcome wxpod999zjtest7-haproxy:/root# /case 1********************************* acl url_static path_end .html .gif .png .jpg .css .js
use_backend api_zjtest7_com if url_static acl url_web_wwm path_beg -i /scan
use_backend zjtest7_com if url_web_wwm zjtest7-haproxy:/root# curl api.zjtest7.com/scan/index.html
nginx01-192.168.32.76 20161218 此时可以访问 因为先匹配到了 path_end ,没有继续往下匹配 不然 就会匹配scan 而无法访问 /case 2*********************************** acl url_web_wwm path_beg -i /scan
use_backend zjtest7_com if url_web_wwm
acl url_static path_end .html .gif .png .jpg .css .js
use_backend api_zjtest7_com if url_static zjtest7-haproxy:/root# curl api.zjtest7.com/scan/index.html 此时先匹配到了 /scan 没有继续往下 匹配 去访问zjtest7_com了 所以访问不到

haproxy 规则匹配到了就停止,不会继续匹配下一个的更多相关文章

  1. haproxy image跳转 haproxy匹配 匹配到了就停止,不会继续往下匹配

    <pre name="code" class="html">/***第一种 nginx 配置: location / { root /var/www ...

  2. one(type,[data],fn) 为每一个匹配元素的特定事件(像click)绑定一个一次性的事件处理函数。

    one(type,[data],fn) 概述 为每一个匹配元素的特定事件(像click)绑定一个一次性的事件处理函数. 在每个对象上,这个事件处理函数只会被执行一次.其他规则与bind()函数相同.这 ...

  3. (转)不停止Nginx服务的情况下平滑变更Nginx配置

    在不停止Nginx服务的情况下平滑变更Nginx配置 1.修改/usr/local/webserver/nginx/conf/nginx.conf配置文件后,请执行以下命令检查配置文件是否正确: /u ...

  4. jquery层级原则器(匹配前一个元素后的下一个元素,必须是挨着的)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. 通过匹配绑定select option的文本值 模糊匹配

    //通过匹配绑定select option的文本值 模糊匹配 $(".class option:contains('文本值')").attr("selected" ...

  6. 使用jQuery匹配文档中所有的li元素,返回一个jQuery对象,然后通过数组下标的方式读取jQuery集合中第1个DOM元素,此时返回的是DOM对象,然后调用DOM属性innerHTML,读取该元素 包含的文本信息

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. hdu3065 病毒侵袭持续中 AC自动机入门题 N(N <= 1000)个长度不大于50的模式串(保证所有的模式串都不相同), 一个长度不大于2000000的待匹配串,求模式串在待匹配串中的出现次数。

    /** 题目:hdu3065 病毒侵袭持续中 链接:http://acm.hdu.edu.cn/showproblem.php?pid=3065 题意:N(N <= 1000)个长度不大于50的 ...

  8. Android学习路线(十四)Activity生命周期——停止和重新启动(Stopping and Restarting)一个Activity

    正确地停止和重新启动你的activity在activity的生命周期中是一个非常重要的过程.这样可以确保你的用户感觉到你的应用一直都活着而且没有丢失进度.你的activity的停止和重新启动时有几个重 ...

  9. SpringCloud系列九:SpringCloudConfig 基础配置(SpringCloudConfig 的基本概念、配置 SpringCloudConfig 服务端、抓取配置文件信息、客户端使用 SpringCloudConfig 进行配置、单仓库目录匹配、应用仓库自动选择、仓库匹配模式)

    1.概念:SpringCloudConfig 基础配置 2.具体内容 通过名词就可以发现,SpringCloudConfig 核心作用一定就在于进行配置文件的管理上.也就是说为了更好的进行所有微服务的 ...

随机推荐

  1. nginx-url重写

    location /game_web{ if (!-e $request_filename){//请求不是文件或者目录 rewrite ^/game_web/(\/init/$ last; break ...

  2. [译]Java Thread Sleep示例

    Java Thread Sleep示例 java.lang.Thread sleep(long millis)方法被用来暂停当前线程的执行,暂停时间由方法参数指定,单位为毫秒.注意参数不能为负数,否则 ...

  3. dbt

    Procedure Relocate(s : state; b : base_index) { Move base for state s to a new place beginning at b ...

  4. ics OverbyteIcsHttpProt

    else begin { V7.05 begin } if (FRequestType = httpPOST) or (FRequestType = httpPUT) then begin {$IFD ...

  5. RFC822DateGMT

    function RFC822DateGMT(dd: TDateTime): string; const Days:..] of string= ('Sun','Mon','Tue','Wed','T ...

  6. Spark Streaming揭秘 Day35 Spark core思考

    Spark Streaming揭秘 Day35 Spark core思考 Spark上的子框架,都是后来加上去的.都是在Spark core上完成的,所有框架一切的实现最终还是由Spark core来 ...

  7. EXTJS 4.2 资料 控件之Window窗体自动填充页面

    1.html页面代码: <div id="component" style="width:100%;height:100%"> <body&g ...

  8. Increase SharePoint Execution Timeout

    <system.web> <compilation batch="false" batchTimeout="600" maxBatchSize ...

  9. 苹果Mac操作系统下怎么显示隐藏文件

      对于新手而已民,苹果的MAC操作系统刚用时用得很不习惯,比如想要显示被隐藏的文件时,不像windows有个“文件夹选项”对话框可以来设置,百度出来的结果都是用命令来操作,但我建议不要用命令去操作, ...

  10. ANN中Precision-Recall权衡

    如果想要得到较高的精度,则需要较长的编码. 编码长度m增长的话,则item碰撞的概率会成倍的减小,从而导致召回率下降. 为了得到较高的召回率,则需要多个哈希表. 参考http://yongyuan.n ...