Python on Nginx

Francis Daly francis at daoine.org
Tue Oct 11 18:59:50 UTC 2011


On Tue, Oct 11, 2011 at 02:43:32PM -0400, etrader wrote:

> You mean to add another location as
>     location ~ \.py$ {
> fastcgi_pass   127.0.0.1:9000;
> fastcgi_index  index.py;
> fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
>     include /opt/nginx/conf/fastcgi_params;
> }

If all of your python urls end in .py, yes.

Although you probably don't want 127.0.0.1:9000, since that's
your php-fastcgi server. You'll want whatever your python-fastcgi
server address is: probably 127.0.0.1:8080, if you followed
http://wiki.nginx.org/PythonFlup

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list