nginx doesn't allow to directly execute external programs, so to run CGIs you need to run an standalone fcgi backend and connect to it with the fastcgi_pass
directive.
For php it's easy, e.g. using spawn-fcgi
and php5-cgi
, but I haven't found anything similar for python.
I know that there are fcgi implementations for specific applications and frameworks, but, is there anything to run plain python CGIs (CGIs implemented with the generic cgi module)?