map $uri $match {
        ~^/common/file/dachui/(.*) /dachui/;
    }

$match  为 /dachui/
$uri  nginx内置变量  

假如 $uri 为 /common/file/dachui/20170427160407.jpg
正则匹配后 $1 为 20170427160407.jpg

$match$1 为  dachui/20170427160407.jpg   要放一起用,否则$1不生效

http://www.ttlsa.com/nginx/using-nginx-map-method/

results matching ""

    No results matching ""