Welcome! Log In Create A New Profile

Advanced

X-Accel-Redirect in LUA?

Richard Kearsley
July 23, 2012 04:16AM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

X-Accel-Redirect in LUA?

Richard Kearsley July 23, 2012 04:16AM

Re: X-Accel-Redirect in LUA?

pavelvasev January 09, 2017 02:23AM

Re: X-Accel-Redirect in LUA?

Richard Kearsley January 09, 2017 04:16AM

Re: X-Accel-Redirect in LUA?

pavelvasev January 09, 2017 04:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready