What you need to do to host it with a specific WSGI hosting mechanism depends on the server.
In the case of Apache / mod_wsgi and Phusion Passenger, you just need to provide a WSGI script file that contains an object called an "application." For web.py 0.2, this is the result of calling web.wsgifunc () with the corresponding arguments. For web.py 0.3, you use the member function wsgifunc () of the object returned by web.application () instead. For more information, see the mod_wsgi documentation:
http://code.google.com/p/modwsgi/wiki/IntegrationWithWebPy
If instead you need to use FASTCGI, SCGI, or AJP adapters for a server such as Lighttpd, nginx, or Cherokee, then you need to use the “flup” package to provide a bridge between these language agnostic interfaces and WSGI. This includes calling the flup function with the same WSGI application object as something like mod_wsgi, or Phusion Passenger will use directly without the need for a bridge. For more details, see:
http://trac.saddi.com/flup/wiki/FlupServers
It is important to structure your web application so that it is in its own set of modules. To work with a specific server, create a separate script file necessary for the connection between what is required for this server and the code of your application. Your application code should always be outside the directory of the web server document, and only the script file, which acts as a bridge, will be located in the server document directory if necessary.
Graham dumpleton
source share