WSGI as tubes, from Ian Bicking's PyCon talk.
So what is WSGI anyway?
WSGI (pronounced Whisky) is the Web Server Gateway Interface. It is a specification for web servers and application servers to communicate with web applications (though it can also be used for more than that). It is a Python standard, described in detail in PEP 333.
Links:
modwsgi
modwsgi is an Apache module which can host any Python application which supports the Python WSGI interface. The module is suitable for use in hosting high performance production web sites, as well as average personal sites running on commodity web hosting services.
To install: yum install mod_wsgi
Example Settings for MoinMoin
httpd.conf
WSGISocketPrefix run/wsgi # new wsgi moin stuff # this is for icons, css, js (and must match url_prefix from wiki config): Alias /moinmoin/ls_stardust/ /home/david/www/ls_stardust/ # this is the URL http://servername/moin/ you will use later to invoke moin: WSGIScriptAlias /wiki /home/david/lib/moinmoin/moin.wsgi # create some wsgi daemons - use someuser.somegroup same as your data_dir: WSGIDaemonProcess wikidaemon user=david group=david processes=5 threads=10 maximum-requests=1000 umask=0007 # umask=0007 does not work for mod_wsgi 1.0rc1, but will work later # use the daemons we defined above to process requests! WSGIProcessGroup wikidaemon
moin.wsgi
import logging
from MoinMoin.server.server_wsgi import WsgiConfig, moinmoinApp
class Config(WsgiConfig):
logPath = '/home/david/data/moinmoin/moin.log' # adapt this to your needs!
#loglevel_file = logging.INFO # adapt if you don't like the default
config = Config() # MUST create an instance to init logging!
application = moinmoinApp
flup
flup includes three sets of WSGI servers/gateways, which speak AJP 1.3, FastCGI, and SCGI. Each server comes in two flavors: a threaded version, and a forking version.
