Welcome! Log In Create A New Profile

Advanced

Re: Nginx RP: a lot of rewrite rules

Francis Daly
April 04, 2013 05:36AM
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.

Cheers,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx RP: a lot of rewrite rules

davide.damico April 04, 2013 03:02AM

Re: Nginx RP: a lot of rewrite rules

Francis Daly April 04, 2013 05:36AM

Re: Nginx RP: a lot of rewrite rules

Francis Daly April 04, 2013 02:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 63
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready