death114 发表于 2018-11-8 13:01:01

nginx location 指令

location    = / {  # matches the query / only.
  [ configuration A ]
  }
  location    / {
  # matches any query, since all queries begin with /, but regular
  # expressions and any longer conventional blocks will be
  # matched first.
  [ configuration B ]
  }
  location ^~ /images/ {
  # matches any query beginning with /images/ and halts searching,
  # so regular expressions will not be checked.
  [ configuration C ]
  }
  location ~* \.(gif|jpg|jpeg)$ {
  # matches any request ending in gif, jpg, or jpeg. However, all
  # requests to the /images/ directory will be handled by
  # Configuration C.
  [ configuration D ]
  }

页: [1]
查看完整版本: nginx location 指令