So is "rewrite_by_lua" also evil?

Nginx User nginx at
Sat Oct 15 14:20:08 UTC 2011

On 15 October 2011 16:22, agentzh <agentzh at> wrote:
> On Sat, Oct 15, 2011 at 7:37 PM, Nginx User <nginx at> wrote:
>> Would it mean "if" blocks? The last, redirect, permanent etc flags
>> available to rewrite are very convenient.
> Making different Nginx modules work together requires a bit more
> understanding of how things work behind the scene, like phase handler
> running order and etc.
> Nginx is full of dark magic already. That's the Nginx way of doing
> things (at least for now) and let's face it.
> Do not expect everything to work intuitively for multi-module
> scripting especially when interacting with ngx_rewrite. And that's why
> I suggest staying in pure Lua as much as possible.

Makes sense to stick to one given that each is independent of the other.
Just so tempting/logical on the surface, when they all go into the
same location block for instance, to try to pick and choose elements
from each.

In my example, the flags from rewrite with the single line syntax is
nice, clear and familiar but it does not provide a native mechanism to
jump to another specific location (perhaps Igor would consider
allowing try_files to accept a single argument).

Anyway, learnt a bit more and I will like to say thank you very much
for the work put in to the various weird and wonderful modules you
have pushed out.
The modules open up a huge amount of options and really take Nginx to
another level.

More information about the nginx mailing list