Helpful articles for configuring sites on Webfaction

Migrate E-mail accounts

 Configuring the App

 Serving Static Media

 Serving Admin Media

 Redirect Domain

Configuring multiple Django sites on one server

Steps for setting up typical Django App

  1. create the django and static_media applications (webfaction control panel); and create a website entry for them
  2. install any third part applications under /tp_apps (e.g., wget install scripts from jscripts/tiny_mce)
  3. set up the static_media directory:
    • add the StaticMediaReadMe file
    • create symbolic links to admin and app media, E.g.,
      • ln -s /home/user/webapps/django/lib/python2.5/django/contrib/admin/media admin
      • ln -s /home/user/webapps/django/project/static/ static
    • create the tp (third party) directory, and create links from there to any installed apps in /tp_apps, E.g.:
      • ln -s /home/user/tp_apps/tiny_mce tinymce
    • create any other media directories required by the app (e.g., file uploads)
  4. create the DB (empty)
  5. create an appropriate settings file for this environment, and give it a unique identifier in top-level
  6. checkout the source code to the django project directory, E.g.:
    • svn checkout
  7. update the wsgi entry, E.g.:
    • mv myproject.wsgi project.wsgi
    • vi project.wsgi - set the project settings file correctly.
      • cd ~/webapps/django/apache2/conf
      • vi httpd.conf
      • WSGIScriptAlias / /home/user/webapps/django/project.wsgi
  8. create a restart script in the django directory: ln -s /home/bcortho/webapps/django/apache2/bin/restart restart_apache
  9. configure the app
    • run syncdb
    • load any required data fixtures
    • run any test scripts
    • restart apache
    • test