Blog » Blog Entry

Django Apache vhost

March 4, 2007

I thought someone else may need a complete working example, all in one chunk of code:

<VirtualHost 127.0.0.1>
  ServerName mysite
  <Location />
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    PythonPath "[ '/Users/destiney/django' ] + sys.path"
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
    PythonDebug On
    Order deny,allow
    Allow from all
  </Location>
  Alias /media /usr/src/django_src/django/contrib/admin/media
  <Location "/media/">
    SetHandler None
  </Location>
</VirtualHost>
Tags: apache, vhost, python, django

« Django's missing join model ESR dumps Fedora, yay! »

Add a comment:

Title:

Comment:

Name:

Email: