部分匹配测试
nginx.conf中添加如下配置
location /test {
default_type text/html;
content_by_lua '
ngx.say("<p>hello, world</p>")
';
}
重新载入配置
ores -p `pwd` -c conf/nginx.conf -s reload
诡异的现象,只要/test开头的uri全部被匹配了!!!
[root@VM_0_17_centos ~]# curl localhost/test
<p>hello, world</p>
[root@VM_0_17_centos ~]# curl localhost/test_xx
<p>hello, world</p>
[root@VM_0_17_centos ~]# curl localhost/test_xx/1
<p>hello, world</p>