Mod_PYTHON was the first way to run Python applications under Apache with excellent performance. It’s still awesome, though Mod_WSGI has superceeded it.
Create myapp/mod_python.py, which will be loaded by Mod_PYTHON
from chula.www.adapters.mod_python import adapter
from model import configuration
@adapter.handler
def handler():
return configuration.app
Update your apache VirtualHost to have:
<Directory /path/to/myapp>
PythonDebug On
PythonHandler mod_python
PythonPath "['/path/to/myapp'] + sys.path"
SetHandler python-program
</Directory>
Restart Apache:
sudo /etc/init.d/apache restart
Now you should be able to hit: http://your-server/myapp/blog