Created
July 24, 2008 04:10
-
-
Save trey/2042 to your computer and use it in GitHub Desktop.
Basic VirtualHosts information for serving Django projects using Apache and mod_python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName example.com | |
ServerAlias www.example.com | |
# - If you want to serve media files from the same server, you need to | |
# define `DocumentRoot` and the extra `Location` for the static folder. | |
# - If you also want to have your media folder inside your Django project, | |
# a `public/` folder is probably not a bad idea. | |
DocumentRoot /home/username/public_html/project_name/public/ | |
PythonPath "['/home/username/public_html', '/home/username/sources/django/trunk/django'] + sys.path" | |
<Location "/"> | |
SetHandler python-program | |
PythonHandler django.core.handlers.modpython | |
SetEnv DJANGO_SETTINGS_MODULE app_name.settings | |
PythonDebug Off | |
</Location> | |
<Location "/static"> | |
SetHandler None | |
</Location> | |
</VirtualHost> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment