Welcome! Log In Create A New Profile

Advanced

Re: Passing request directly to named location

February 11, 2011 07:08AM
Igor Sysoev Wrote:
-------------------------------------------------------
> I heard this "centralise" mantra many times.
> Believe me, it works until
> your configuration fits on screen or two. When it
> grows, every, note,
> EVERY configuration modification becames
> investigation of
> configuration dependences. I have an configuraiton
> with 180 locaitons.
> When I need to add some functionality, I simply
> add location and
> that is all. I do not look through whole 90K file.
>
> Why ? Because I
>
> 1) use only locations without regex.
> 2) do not use rewrite's at all.
>
> If I need to change a proxied server name or
> something else, I use simple
> find/replace in VIM. This is very easy, it's much
> easy than investigation
> of configuration dependences on every change.

Noted. I used to have them like you have but with time, I have found having stuff centralised more convenient for me.
That is the great thing about this little webserver you have written ... it allows tons of options and with agentzh and the other fellas in Shanghai coming out with all sorts of crazy modules, it is just mouth watering.

Would be nice if some of the stuff coming out of Shanghai could be pushed into the core.

BTW, please consider 'proxy_no_cache_null' and 'proxy_cache_bypass_null' options to complement the 'proxy_no_cache' and 'proxy_cache_bypass' options. That is, they should not cache / bypass cache for requests where the passed variables are null. I use the current options to bypass cache for logged in users after checking a cookie but it is difficult to bypass cache based on absence of cookie.

Anyway, this is deviating and I managed to use the lua module from agentzh (with his help) to do this.

>
> > So in terms of the try files and error page
> options, can you advise
> > which is better ... taking note of what you said
> about doing each proxy
> > pass every time?
>
> error_page is faster because it does not make
> syscall.

Thanks. I thought that might be the case.
Subject Author Posted

Passing request directly to named location

Dayo February 11, 2011 05:08AM

Re: Passing request directly to named location

Igor Sysoev February 11, 2011 05:26AM

Re: Passing request directly to named location

Dayo February 11, 2011 06:12AM

Re: Passing request directly to named location

Igor Sysoev February 11, 2011 06:42AM

Re: Passing request directly to named location

Dayo February 11, 2011 07:08AM

Re: Passing request directly to named location

Dayo February 13, 2011 07:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 165
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