So,
You mean that I should not send 0 or 1 but a status and let nginx send 0 if it
sees a status of 404 and proxy the file if the application yields a 500 header ?
if would end with :
nginx :
/mylocation {
include uwsgi_params;
#other stuffs to lead to my app socket
uwsgi_intercept_errors on;
error_page = 404 @my404handler;
error_page = 500 $uri;
}
my404handler {
return 0;
}
That is the logic ?
> Date: Mon, 11 Nov 2013 18:38:42 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: [uWSGI] Send datas back to nginx from uwsgi ?
>
>
> > Hello !
> >
> > I would like to know if it is possible to pass datas from nginx to uwsgi
> > (that is possible) but to make uwsgi answer to nginx so that nginx is able
> > to keep going its logic and redirect to a file.
> >
> > Not very clear. Here is what I think :
> >
> > User -> (sends post/get to server)
> > Nginx -> (proxies post/get to uwsgi)
> > -> Uwsgi -> (uwsgi treats the command according to the application logic
> > and yields a boolean : 0 or 1; it is arbitrary and coded in the
> > application logic. So replace 0 and 1 with whatever you want.)
> > -> Nginx -> (Nginx reads that result and acts accordingly : if 1 proxy to
> > file if 0 sends 0 back to the user.)
> > -> User (gets file or 0; this case is treated with javascript)
> >
> > Is there a possibility ?
> >
> > Thanks !
> >
> >
>
> I think you could use
>
> http://wiki.nginx.org/HttpUwsgiModule#uwsgi_intercept_errors
>
> based on the status code you can re-route requests
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi