nginx的location配置匹配指定多个目录

例子一:(http://xx.com/manager , http://xx.com/docs , ...都可以匹配到)

location ~/(manager|docs|examples|host-manager) {

}

例子二:(http://xx.com/home/pages.html , http://xx.com/home/pages1.html可以匹配到)

location ~ ^/home/(pages|pages1)/.*html${

}
正在加载评论...