Django production server

Install

sudo apt-get install python-django libapache2-mod-wsgi python-mysqldb python-setuptools

Virtualhost

<VirtualHost *:80>
ServerName tang.local
WSGIDaemonProcess snake display-name=%{GROUP}
WSGIProcessGroup snake
WSGIScriptAlias / /mnt/host/snake/apache/django.wsgi

Alias /static  /mnt/host/snake/static
</VirtualHost>

WSGI script

import os
import sys
sys.path.append('/mnt/host')
sys.path.append('/mnt/host/snake')
os.environ['DJANGO_SETTINGS_MODULE'] = 'snake.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()