Skip to content

Instantly share code, notes, and snippets.

@lesthack
Created August 28, 2012 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lesthack/3504909 to your computer and use it in GitHub Desktop.
Save lesthack/3504909 to your computer and use it in GitHub Desktop.
VirtualHost Django
<VirtualHost *:80>
ServerName django.localhost.com
ServerAdmin j.hernandez@maices.com
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE preventa.settings
PythonDebug On
PythonPath "['/home/lesthack/public_html/django', '/home/lesthack/public_html/django/preventa'] + sys.path"
</Location>
Alias /media/ "/home/lesthack/public_html/django/preventa/media/"
<Location "/media/">
SetHandler None
</Location>
Alias /static/ "/home/lesthack/public_html/django/preventa/static/"
<Location "/static/">
SetHandler None
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment