---
title: "nginx location url 模糊匹配"
author: "yangchunhe"
date: "2017-03-02T18:56:52Z"
tags: []
categories: ["开源软件"]
slug: "nginx-location-url"
draft: false
lastmod: "2017-03-02T18:56:52Z"
id: 2359935
url: "https://yangchunhe.iteye.com/blog/2359935"
---

匹配以v1开始，且跳过任意字符串，且后面包含xxx的url路径，nginx的location配置方法如下： 

 

```
location ~ ^/v1/.*/xxx.* {
      //此处省略
}
```