Welcome! Log In Create A New Profile

Advanced

Re: Python on Nginx

October 12, 2011 05:10AM
On Tue, Oct 11, 2011 at 07:09:32PM +0100, Francis Daly wrote:
> On Tue, Oct 11, 2011 at 10:11:14AM -0400, etrader wrote:
>
> Hi there,
>
> > The instruction given on http://wiki.nginx.org/PythonFlup is to install
> > nginx supporting python. But I have a working Nginx with php-fpm
> > supporting PHP. Now I want to add support of python too. Thus, my config
> > is slightly different.
>
> nginx doesn't know (or care) that you are using php or python or anything
> else. All it knows is how you have configured different location{} blocks.
>
> Each request is handled by one location, so you must make sure that you
> have the right configuration in the location that your request matches.
>
> > How should modify the nginx config to support python?
>
> If you are currently using php-fpm, you probably have something like
>
> location [something that matches urls that should be handled by php] {
> fastcgi_pass [your php-fastcgi server];
> }
>
> So now that you are adding a separate fastcgi server that is associated
> with python, you'll want to add a new location block like
>
> location [something that matches urls that should be handled by python] {
> fastcgi_pass [your python-fastcgi server];
> }
>
> The details depend on what you're trying to do. The documentation on
> "location", or the debug log, should show you which location is being
> used for each request -- if it's not the right one, you'll need to
> adjust the config.
>
> Good luck with it,

BTW, I know that some people prefer to use uWSGI server for python.


--
Igor Sysoev

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

Python on Nginx

etrader October 11, 2011 10:11AM

Re: Python on Nginx

Francis Daly October 11, 2011 02:10PM

Re: Python on Nginx

Igor Sysoev October 12, 2011 05:10AM

Re: Python on Nginx

Brian Akins October 12, 2011 08:04PM

Re: Python on Nginx

roberto October 12, 2011 11:58PM

Re: Python on Nginx

Brian Akins October 13, 2011 07:00AM

Re: Python on Nginx

Cliff Wells October 12, 2011 09:12PM

Re: Python on Nginx

etrader October 11, 2011 02:43PM

Re: Python on Nginx

Francis Daly October 11, 2011 03:00PM

Re: Python on Nginx

Keith Fernie October 11, 2011 03:08PM

Re: Python on Nginx

Cliff Wells October 11, 2011 03:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 77
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