Deploying Snowy with mod_python


If you are running your own server, you may wish to deploy Snowy using Apache and mod_python. This guide is intended to help you do just that. Thanks to Piotr Gaczkowski and jmullan for the help with these instructions.


You need to already have apache and mod_python installed and properly configured. There are various guides for this:

(Please add a link for your distro if you don't see one)

I'm also assuming that since you run your own server, you've already tested your Snowy install using the Django test server ( runserver), followed the instructions in INSTALL, etc.


In this example, we will run Snowy in , so you need to create ~/public_html/snowy/.htaccess with the following contents:

SetHandler python-program
PythonPath "['/home/USERNAME/src', '/home/USERNAME/src/snowy'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE snowy.settings
PythonOption django.root /~USERNAME/snowy
PythonDebug On

Important notes:

  • Replace USERNAME with your user name.

  • PythonPath - At the minimum, this should include the parent directory of your Snowy install/checkout, and the actual directory of your Snowy install/checkout. If you do not have Django installed on your path, you'll need to add its install path as well (/usr/local/lib/python2.6/site-packages/django/, for example).

  • DJANGO_SETTINGS_MODULE - if you don't want to use stock snowy.settings you can overwrite it here.

  • django.root - path under which Snowy exists at your web server, eg. when it's at you should put /~user/snowy as a django.root.


If you are using sqlite, make sure that your specifies an absolute path to the database file.

Projects/Snowy/Install/ModPython (last edited 2013-11-22 20:53:50 by WilliamJonMcCann)