Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apache vhost template for graphite
# <%= @sysadmin_beware %>
# This configuration assumes the default installation prefix
# of /usr/share/graphite/
<% #grab some variables
wsgifile = scope.lookupvar("graphite::settings::wsgipath")
-%>
<IfModule !wsgi_module.c>
LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>
WSGISocketPrefix run/wsgi
<VirtualHost *:80>
ServerAdmin <%= admin %>
ServerName <%= name %>
DocumentRoot <%= docroot %>
# I've found that an equal number of processes & threads tends
# to show the best performance for Graphite (ymmv).
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
WSGIProcessGroup graphite
WSGIApplicationGroup %{GLOBAL}
WSGIImportScript <%= wsgifile -%> process-group=graphite application-group=%{GLOBAL}
WSGIScriptAlias / <%= wsgifile -%>
Alias /content/ <%= docroot -%>/content/
<Location "/content/">
SetHandler None
</Location>
Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
<Location "/media/">
SetHandler None
</Location>
# The graphite.wsgi file has to be accessible by apache. It won't
# be visible to clients because of the DocumentRoot though.
<Directory /usr/share/graphite/>
Order deny,allow
Allow from all
</Directory>
ErrorLog <%= logdir -%>/<%= name -%>-error.log
CustomLog <%= logdir -%>/<%= name -%>-access.log client-ip
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.