location "/server/" is outside location ".*\.(html)"
报错如上。
location ~.*\.(html) {
location /server/ {
add_header Cache-Control no-store,must-revalidate;
add_header test test1;
}
location /client/ {
add_header Cache-Control no-store,must-revalidate;
add_header test test2;
}
}
报错的话解释很明确了,但是有个奇怪的情况是,如果我换成了 location ~ /client/ 的话,也就是加了 ' ~ '就不会报错了,求问为什么这两种方式会出现这个差异。