Nginx

@20190301 新版功能: 创建,Location 匹配优先级

Location

Location 匹配优先级(参考 官方文档 )如下:

  1. = (exactly) : location = /path
  2. ^~ (forward match) : location ^~ /path
  3. ~ (regular expression case sensitive) : location ~ /path/
  4. ~* (regular expression case insensitive) : location ~* .(jpg|png|bmp)
  5. / : location /path