Nginx RP: a lot of rewrite rules

Davide D'Amico davide.damico at
Thu Apr 4 07:01:17 UTC 2013

I've two freebsd 9.1 vm (2 corees, 4gb ram) with nginx-1.2.7 in 
active/passive mode (using carp), acting as a reverse proxy to 4 
apache22 backend (2 cores, 4gb ram).
I should set 800 simple rewrite rules, such as:

rewrite ^/something/foo.html /bar.html permanent;

I cannot use any regexp to optimize all these rules, I have no 
scripting language enabled (the vhosts will serve only static pages, the 
apache22 backend will use SSI too).

Here the question:

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?


More information about the nginx mailing list