Welcome! Log In Create A New Profile

Advanced

Re: Local processing return values from fastcgi_pass

Maxim Dounin
August 01, 2014 10:54AM
Hello!

On Fri, Aug 01, 2014 at 08:48:24AM -0400, itpp2012 wrote:

> For example I have one fastcgi_pass location block and I want to process the
> return values of a request to use in a second fastcgi_pass, is this possible
> ?
>
> location ... {
> ...
> fastcgi_pass server1;
> # server1 returns some values
> # process these values and call another fastcgi_pass server
> if (!$valuechecked) { return 404; }
> fastcgi_pass server2;
> }

If you are able to control the backend, this is something to be
done with X-Accel-Redirect. If you can't, and you have to inspect
response body returned by server1, then the "out of the box"
options is to use SSI include with "set" parameter, and do
appropriate processing in SSI. Or you may consider eval module by
Valery Kholodkov, see here:

http://grid.net.ru/nginx/eval.en.html

(not sure if it's still works though)

--
Maxim Dounin
http://nginx.org/

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

Local processing return values from fastcgi_pass

itpp2012 August 01, 2014 08:48AM

Re: Local processing return values from fastcgi_pass

Maxim Dounin August 01, 2014 10:54AM

Re: Local processing return values from fastcgi_pass

itpp2012 August 01, 2014 03:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready