Config file order
Maxim Dounin
mdounin at mdounin.ru
Thu Feb 9 17:59:02 UTC 2012
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
More information about the nginx
mailing list