zoukankan      html  css  js  c++  java
  • 【原创】运维基础之Nginx(3)location和rewrite

    nginx location

    • =:精确匹配(必须全部相等)
    • ~:大小写敏感,正则匹配
    • ~*:忽略大小写,正则匹配
    • ^~:只需匹配uri部分,精确匹配
    • @:内部服务跳转,精确匹配

    优先级:

    1. Exact match =
    2. Forward match ^~ /
    3. Case sensitive regex ~ /
    4. Case insensitive regex ~*
    5. Path match /

    规则

    精确匹配规则是“最大前缀”.
    正则匹配规则是“顺序匹配”,只要匹配到第一个就停止后面的匹配.
    通用匹配 “/”最后匹配

    nginx rewrite

    rewrite ^(.*)$ /other/path/or/server/$1 break;

  • 相关阅读:
    UVA
    UVA
    UVA
    UVA
    UVA
    UVA
    UVA
    UVA
    UVA
    使用Jmeter(三十)针对ActiveMQ JMS POINT TO POINT压力测试(转载)
  • 原文地址:https://www.cnblogs.com/barneywill/p/10827391.html
Copyright © 2011-2022 走看看