Nginx RP: a lot of rewrite rules
Davide D'Amico
davide.damico at contactlab.com
Thu Apr 4 10:20:42 UTC 2013
Il 04/04/13 11:34, Francis Daly ha scritto:
> On Thu, Apr 04, 2013 at 09:01:17AM +0200, Davide D'Amico wrote:
>
> Hi there,
>
>> Is it better to use (in terms of performances, reliability, load on the
>> reverse proxy) the rewrite rules on the nginx reverse proxy, or use the
>> rewrite rules on the apache22 backend?
>
> Completely untested, but it seems that "the earliest place you can do it"
> is the right place to do it, at least for a straightforward mechanical
> transformation like this.
>
> So I'd say "on nginx".
>
> When you are doing the load-testing, you might want to consider comparing:
>
> * rewrite ^/old /new permanent;
> * location = /old { return 301 /new; }
> * map new $uri { default 0; /old /new; }
> if ($new) { return 301 /new; }
>
> (Confirm the syntax before testing; these are just some alternative
> suggestions.)
>
> I suspect that the suggestions are increasingly more efficient -- but
> you presumably have the interest to find out for sure, on your hardware
> and with your expected loads.
>
Thank you Francis, but I cannot "group" all the rewrite I have so I am
starting using all these rewrites on backends (where I have rewritemaps,
too) and later I'll test them on nginx.
d.
More information about the nginx
mailing list