When I study about the nginx location configuration, I have some questions.Here is my example.
the files structure is like this: test1/index.html test2/index.html
and the nginx.conf location part is like below:
location = / {
root test1;
index index.html;
# deny all;
}
location / {
root test2;
index index.html;
}
the question is , when i issue curl -v http://host/, I get the page of test2/index.html , but when I get rid of the # in the location = / {} part, the result will be 403 forbidden. can anyone explain why ? when both the location = same_uri {A} and location same_uri {B} are in the configuration file,which configuration will match[A or B]? Thank you very much.
http://nginx.org/en/docs/http/ngx_http_core_module.html#location