Config file order

Bai Shen baishen.lists at
Thu Feb 9 18:07:17 UTC 2012

That's what I thought, but I wasn't sure.  I'm trying to get the remote IP
to show up in my web server logs and wanted to make sure nginx was sending

On Thu, Feb 9, 2012 at 12:59 PM, Maxim Dounin <mdounin at> wrote:

> Hello!
> On Thu, Feb 09, 2012 at 12:49:16PM -0500, Bai Shen wrote:
> > I know the server order in the config file makes a difference.  Does the
> > order of the statements inside the location tags make a difference?
> >
> > Do I need to set the headers before doing a proxy_pass or does it matter?
> In most cases order doesn't matter.  There are some special cases
> though, most notably regexp locations and rewrite module
> directives, where order matters.  In such special cases order of
> processing is usually explicitly documented.
> As for proxy_pass and proxy_set_header - order doesn't matter.
> Maxim Dounin
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list