Skip to content

Instantly share code, notes, and snippets.

@obazoud
Created February 4, 2013 14:53
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 obazoud/4707183 to your computer and use it in GitHub Desktop.
Save obazoud/4707183 to your computer and use it in GitHub Desktop.
Graphite Apache configuration
<VirtualHost *:80>
ServerName graphite
DocumentRoot "/opt/graphite/webapp"
ErrorLog /opt/graphite/storage/log/webapp/error.log
CustomLog /opt/graphite/storage/log/webapp/access.log common
<Location "/">
SetHandler python-program
PythonPath "['/opt/graphite/webapp'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE graphite.settings
PythonDebug Off
PythonAutoReload Off
</Location>
<Location "/content/">
SetHandler None
</Location>
<Location "/media/">
SetHandler None
</Location>
# NOTE: In order for the django admin site media to work you
# must change @DJANGO_ROOT@ to be the path to your django
# installation, which is probably something like:
# /usr/lib/python2.6/site-packages/django
# Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
Alias /media/ "/usr/lib/python2.7/dist-packages/django/contrib/admin/media/"
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment