Welcome! Log In Create A New Profile

Advanced

Re: Nginx as a reverse caching / load balancing solution - verification of setup needed.

B.R.
September 04, 2015 02:02PM
Igor recommends using prefix locations as much as possible.
If you were to use regex locations, you might want to embed them into
prefix ones so order only matters at the leaves of the tree, which helps
avoiding conflicts and makes you configuration scalable the most.

Here is a presentation by Igor himself about the latter:
https://youtu.be/YWRYbLKsS0I
---
*B. R.*

On Fri, Sep 4, 2015 at 2:01 PM, Brent Clark <brentgclarklist@gmail.com>
wrote:

> Thank you ever so much.
>
> Regards
> Brent
>
>
> On 04/09/2015 13:29, Sebastian Krebs wrote:
>
>
>
> 2015-09-04 12:04 GMT+02:00 Brent Clark <brentgclarklist@gmail.com>:
>
>> Good day Guys.
>>
>> I would like to ask if someone could please verify my configs :
>> http://pastebin.com/8Xk63RYD
>> http://pastebin.com/EfNSpvMV
>>
>> I have a Nginx server sitting in front of two Apache servers.
>> I'm using Nginx as a reverse caching / load balancing solution.
>> But what I'm trying achieve is to cache only for images, css and Js.
>>
>> All in all it appears it all works.
>>
>> The other question I would like to ask is, does the order of location
>> matter?
>>
>
> Depends. For regular expression based location is does, for prefix based
> locations it doesn't. See
> <http://nginx.org/en/docs/http/ngx_http_core_module.html#location>
> http://nginx.org/en/docs/http/ngx_http_core_module.html#location
>
> A location can either be defined by a prefix string, or by a regular
>> expression. Regular expressions are specified with the preceding “~*”
>> modifier (for case-insensitive matching), or the “~” modifier (for
>> case-sensitive matching). *To find location matching a given request,
>> nginx first checks locations defined using the prefix strings (prefix
>> locations). Among them, the location with the longest matching prefix is
>> selected and remembered. Then regular expressions are checked, in the order
>> of their appearance in the configuration file. The search of regular
>> expressions terminates on the first match, and the corresponding
>> configuration is used. If no match with a regular expression is found then
>> the configuration of the prefix location remembered earlier is used.*
>>
>
>
>>
>> If anyone can help, it would be appreciated.
>>
>> Thanks
>> Brent
>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
>
> --
> github.com/KingCrunch
>
>
> _______________________________________________
> nginx mailing listnginx@nginx.orghttp://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx as a reverse caching / load balancing solution - verification of setup needed.

Brent Clark September 04, 2015 06:06AM

Re: Nginx as a reverse caching / load balancing solution - verification of setup needed.

Sebastian Krebs September 04, 2015 07:32AM

Re: Nginx as a reverse caching / load balancing solution - verification of setup needed.

Brent Clark September 04, 2015 08:04AM

Re: Nginx as a reverse caching / load balancing solution - verification of setup needed.

B.R. September 04, 2015 02:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 255
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready