nginx rewrites $request_method on error
kay
nginx-forum at nginx.us
Wed May 14 06:52:19 UTC 2014
Yichun Zhang (agentzh) Wrote:
-------------------------------------------------------
> Hello!
>
> On Wed, May 7, 2014 at 8:59 PM, kay wrote:
> >> 1. It is not recommended to use the rewrite_by_lua directive
> directly
> >
> > You can do the same with access_by_lua
> >
>
> Please do not cut my original sentence and just pick the first half.
> The full sentence is "it is not recommended to use the rewrite_by_lua
> directive directly in the server {} block." and the reason follows
> that. The same statement also applies to access_by_lua.
>
> Also, please read the full text of my previous email and correct all
> the things I listed there.
>
> Regards,
> -agentzh
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
This config produces the same nginx hang.
server {
listen 80;
location / {
access_by_lua '
local res = ngx.location.capture("/memc?cmd=get&key=test")
return
';
root /etc/nginx/www;
}
location /memc {
internal;
access_log /var/log/nginx/memc_log main;
log_subrequest on;
set $memc_key $arg_key;
set $memc_cmd $arg_cmd;
memc_cmds_allowed get;
memc_pass localhost:11211;
}
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,249754,250070#msg-250070
More information about the nginx
mailing list