Steps to adding a host:
1) Add block to /usr/local/etc/lighttpd-sites.conf
$HTTP["host"] == "djangosource.com" {
server.document-root = "/home/djangoso",
alias.url = (
"/media/" => server.document-root+"/media/",
),
url.rewrite-once = (
"^(/media.*)$" => "$1",
"^(/.*)$" => "/django.fcgi$1"
),
fastcgi.server = (
"/django.fcgi" =>
( "localhost" =>
(
"socket" => server.document-root+"/django-fcgi.socket"
)
)
)
}
2) give them a new project, named www
django-admin.py startproject
3) setup their database, based on their request (for now, only mysql), and fill their premade settings.py with it
DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = '' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
4) set their media root and media url in their premade settings.py
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
5) set their template path in their premade settings.py
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)
6) give control to start/stop their webserver
./manage.py runfcgi method=prefork socket=/home/djangoso/django-fcgi.socket pidfile=django.pid