I would recommend that the documentation for location matching is
updated http://wiki.nginx.org/HttpCoreModule#location, explicitaly the example.
It
should contain a conventional strings besides the root ‘/’ of the site:
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 /media/ {
matches any query beginning with /media/ and continues serching,
so regular expressions will be checked. This will be matched only if
regular expressions don’t find a match
[ configuration D ]
}
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 E ]
}
I don’t know who could I ask about this, but I think that it’s important
that all 4 explained steps in the documentation are covered by the
example.
This wiki article was originated as a translation of official
documentation in Russian (which is now available in English, too,
see Module ngx_http_core_module), and I always asked people to
don’t deviate from official docs but keep it as a translation,
keeping comments/suggestions/additional notes separate from an
article.
And I actually think that suggested change will be good for
understanding, and it would be good to add it to official
documentation.
Sorry for a late reply and thanks for your help. I did update the wiki
documentaion http://wiki.nginx.org/HttpCoreModule#location, I hope it is
ok
and that location matching will now be clearer to new Nginx users.
On Sun, Oct 28, 2012 at 05:48:30PM -0400, kustodian wrote:
Sorry for a late reply and thanks for your help. I did update the wiki
documentaion http://wiki.nginx.org/HttpCoreModule#location, I hope it is ok
and that location matching will now be clearer to new Nginx users.
Ruslan already updated official docs according to your suggestion,
BTW: