I've been told wsgi is the way to go and not mod_python. But more specifically, how would you set up your multi website server environment? Choice of web server, etc?
I'd recommend Nginx for the web server. Fast and easy to set up.
You'd probably want to have one unix user per vhost - so every home directory holds its own application, python environment and server configuration. This allows you to restart a particular app safely, simply by killing worker processes that your vhost owns.
Just a tip, hope it helps.
You could use Apache and mod_wsgi. That way, you can still use Apache's built-in support for vhosts.
Apache+mod_wsgi is a common choice.
Here's a simple example vhost, setup up to map any requests for /wsgi/something to the application (which can then look at PATH_INFO to choose an action, or however you are doing your dispatching). The root URL '/' is also routed to the WSGI application.
LoadModule wsgi_module /usr/local/lib/mod_wsgi.so
...
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /www/example/htdocs
WSGIScriptAliasMatch ^/$ /www/example/application.py
WSGIScriptAlias /wsgi /www/example/application.py
</VirtualHost>
You can use the WSGIProcessGroup directive to separate handlers for different vhosts if you like. If you need vhosts' scripts to be run under different users you'll need to use WSGIDaemonProcess instead of the embedded Python interpreter.
application.py would, when run, leave your WSGI callable in the global ‘application’ variable. You can also add a run-as-main footer for compatibility with old-school CGI:
#!/usr/bin/env python
from mymodule import MyApplication
application= MyApplication()
if __name__=='main':
import wsgiref.handlers
wsgiref.handlers.CGIHandler().run(application)