[uWSGI] nginx -> uwsgi -> nginx

Alain Meunier deco33 at hotmail.fr
Sun Apr 13 21:23:16 CEST 2014


Thanks Roberto,

Seems to be what I was seeking for.

So I just need to set the header with 
start_response('200 Ok', [('Content-type', 'application/xml;charset=UTF-8'),('X-Accel-Redirect':'/path/to/file')])

And good to go ?

Thanks :)

> Date: Sun, 13 Apr 2014 19:52:56 +0200
> From: roberto at unbit.it
> To: uwsgi at lists.unbit.it
> Subject: Re: [uWSGI] nginx -> uwsgi -> nginx
> 
> 
> > Hello,
> >
> > I would like to implement that :
> >
> > 1) client query nginx server (that is ok)
> > 2) nginx proxy_pass to uwsgi to treat the answer and do the calculation
> > (that is ok)
> > 3) uwsgi talks back to nginx to serve a static file to the client via a
> > loadbalanced upstream (how ?).
> >
> > Is this logic ok ? If so, i cannot find a way in the uwsgi api to talk
> > back to nginx without losing the initial client connection.
> >
> > I thought about another http connection from uwsgi to nginx once the
> > calculation is done but I don't know how not to lose the client
> > informations (x-real) in the meantime.
> >
> >
> 
> What about using the X-Accel nginx feature ?
> 
> http://wiki.nginx.org/X-accel
> 
> 
> -- 
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20140413/4e386fab/attachment.html>


More information about the uWSGI mailing list