I'm just wondering what the differences and advantages are for the different CGI's out there. Which one would be best for python scripts, and how would I tell the script what to use?
The WSGI application runs on the server, and acts as the interface between the server and web application written in a python. The CGI application runs on the server and processes requests passed by server.
However, mod_python was not an official specification. It was simply created so they could run Python code on a server. Unfortunately, it was insecure, and developers began to look for a new solution. WSGI is a descendant of CGI, or Common Gateway Interface.
mod_wsgi is an Apache HTTP Server module by Graham Dumpleton that provides a WSGI compliant interface for hosting Python based web applications under Apache. As of version 4.5.
Basically, FastCGI is a program that manages multiple CGI requests within a single process, saving many program instructions for each request. Without FastCGI, each instance of a user requesting a service causes the Web server to open a new process that gets control, performs the service, and then is closed.
A part answer to your question, including scgi.
CGI vs FCGI
Lazy and not writing it on my own. From the wikipedia: http://en.wikipedia.org/wiki/FastCGI
Instead of creating a new process for each request, FastCGI uses persistent processes to handle such requests. Multiple processes can configured, increasing stability and scalability. Each individual FastCGI process can handle many requests over its lifetime, thereby avoiding the overhead of per-request process creation and termination
There's also a good background reader on CGI, WSGI and other options, in the form of an official python HOWTO: http://docs.python.org/2/howto/webservers.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With