So is "rewrite_by_lua" also evil?

agentzh agentzh at
Wed Oct 12 04:20:16 UTC 2011

On Wed, Oct 12, 2011 at 12:12 PM, Nginx User <nginx at> wrote:
> It is a simplified config. I actually run lua's string.find first and
> test for a hit.
> I know with the "i" modifier would be better but it does
> not work

The API was first introduced in the v0.2.1rc11 release. There's
no wonder that it does not work for you because you're using v0.2.0 :)

> ... maybe I need to update lua module version. I thought I'll
> look into that later.

Surely you need. Please do that before other attempts :)

>> Which version of ngx_lua are you using? Please show me your "nginx -V"
>> output? And which OS are you using? I've tested your example with
>> ngx_lua git master HEAD on Slackware Linux x86_64 and do not have any
>> issues :)
> Centos 5.7 i386.
> lua module is 0.2.0

Sigh, your ngx_lua module is way too old :)

There's a bunch of important fixes regarding ngx.exec() and ngx.exit()
since the ngx_lua v0.2.0 release.

The latest version is v0.3.1rc9 and please try it out.

>> Also, enabling --with-debug in your nginx build and show me the
>> relevant sections of your error.log on the debug error log level will
>> be helpful too :)
> I'll get this later.

Please upgrade your ngx_lua module to the latest version before doing this :)


More information about the nginx mailing list