Python on Nginx

etrader nginx-forum at nginx.us
Tue Oct 11 18:43:32 UTC 2011


My server is as
server {    server_name  .domain.com;
    listen       80;
root  /home/domain.com;
index  index.html index.php;
    location ~ \.php$ {
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include /opt/nginx/conf/fastcgi_params;
}
}

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;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,216514,216533#msg-216533



More information about the nginx mailing list