X-Accel-Redirect in LUA?

Richard Kearsley Richard.Kearsley at m247.com
Mon Jul 23 08:14:30 UTC 2012


Hi
Is it possible to trigger an X-Accel-Redirect from within lua code?

Example:

location /
{
# lua code should trigger X-Accel-Redirect to either location1 or location2? Somehow??
access_by_lua_file /home/nginx/conf/nginx.lua;

# if it hasn't set X-Accel-Redirect, proxy to some other server - important
                proxy_pass http://10.0.0.2;
}

location /location1 {
                internal;
                root /var/www/loc1;
}

location /location2 {
                internal;
                root /var/www/loc2;
}



Richard Kearsley
Systems Developer | M247 Limited
Internal Dial 2210 | Mobile +44 7970 621236

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120723/a87b96ad/attachment.html>


More information about the nginx mailing list