# Nginx Location Matching Documentation Update

**URL:** <https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811>\
**Category:** NGINX\
**Created:** [October 18, 2012, 1:24pm UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811 "2012-10-18T13:24:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 18, 2012, 1:24pm UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811/1 "2012-10-18T13:24:53Z")

</div>

I would recommend that the documentation for location matching is  
updated  
[http://wiki.nginx.org/HttpCoreModule#location](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.

Posted at Nginx Forum:

> **[Nginx Location Matching Documentation Update](https://forum.nginx.org/read.php?2,231966,231966#msg-231966)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![kustodian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b782af/32.png) [@kustodian](https://www.ruby-forum.com/u/kustodian)\
**Post date:** [October 18, 2012, 2:08pm UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811/2 "2012-10-18T14:08:43Z")

</div>

On Thursday 18 October 2012 15:24:14 kustodian wrote:

> I would recommend that the documentation for location matching is updated  
> [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/HttpCoreModule#location), explicitaly the example.  
> […]

You’re referring to the community wiki, not documentation. Feel free to  
update  
it yourself.

The documentation is here: [nginx documentation](http://nginx.org/en/docs/)

wbr, Valentin V. Bartenev

–

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.

> **[nginx: donation](http://nginx.org/en/donation.html)**

---

<div class="post-metadata">

**Author:** ![kustodian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b782af/32.png) [@kustodian](https://www.ruby-forum.com/u/kustodian)\
**Post date:** [October 18, 2012, 2:34pm UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811/3 "2012-10-18T14:34:25Z")

</div>

Hello!

On Thu, Oct 18, 2012 at 04:07:50PM +0400, Valentin V. Bartenev wrote:

> On Thursday 18 October 2012 15:24:14 kustodian wrote:
> 
> > I would recommend that the documentation for location matching is updated  
> > [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/HttpCoreModule#location), explicitaly the example.  
> > […]
> 
> You’re referring to the community wiki, not documentation. Feel free to update  
> it yourself.
> 
> The documentation is here: [nginx documentation](http://nginx.org/en/docs/)

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](http://nginx.org/r/location)), 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.

Ruslan?

–  
Maxim D.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.

---

<div class="post-metadata">

**Author:** ![kustodian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b782af/32.png) [@kustodian](https://www.ruby-forum.com/u/kustodian)\
**Post date:** [October 28, 2012, 10:49pm UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811/4 "2012-10-28T22:49:22Z")

</div>

Sorry for a late reply and thanks for your help. I did update the wiki  
documentaion [http://wiki.nginx.org/HttpCoreModule#location](http://wiki.nginx.org/HttpCoreModule#location), I hope it is  
ok  
and that location matching will now be clearer to new Nginx users.

Posted at Nginx Forum:

> **[Re: Nginx Location Matching Documentation Update](https://forum.nginx.org/read.php?2,231966,232286#msg-232286)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![kustodian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b782af/32.png) [@kustodian](https://www.ruby-forum.com/u/kustodian)\
**Post date:** [October 29, 2012, 9:27am UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811/5 "2012-10-29T09:27:19Z")

</div>

Hello!

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 [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](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:

> **[Module ngx\_http\_core\_module](http://nginx.org/en/docs/http/ngx_http_core_module.html#location)**
>
> This directive appeared in version 1.11.8.

–  
Maxim D.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.

---

<div class="post-metadata">

**Author:** ![kustodian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b782af/32.png) [@kustodian](https://www.ruby-forum.com/u/kustodian)\
**Post date:** [October 29, 2012, 11:04am UTC](https://www.ruby-forum.com/t/nginx-location-matching-documentation-update/223811/6 "2012-10-29T11:04:56Z")

</div>

## Maxim D. Wrote:

> Ruslan already updated official docs according to your suggestion,  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

Then I will update the documentation wiki to be exactly like the  
official  
docs.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,231966,232311#msg-232311](http://forum.nginx.org/read.php?2,231966,232311#msg-232311)
