Permalink
Browse files

Allow user to run graphite webapp under mod_wsgi if

node[:graphite][:graphite_web][:use_mod_wsgi] attribute is set to true.
  • Loading branch information...
1 parent efe53aa commit b52335fa7ef37298deb425b37662b67668aa770d @Kami committed Sep 4, 2012
Showing with 29 additions and 0 deletions.
  1. +1 −0 attributes/graphite.rb
  2. +28 −0 templates/default/graphite-vhost-mod-wsgi.conf.erb
@@ -9,6 +9,7 @@
default[:graphite][:graphite_web][:uri] = "http://launchpadlibrarian.net/82112308/graphite-web-#{node[:graphite][:version]}.tar.gz"
default[:graphite][:graphite_web][:checksum] = "cc78bab7fb26b"
+default[:graphite][:graphite_web][:use_mod_wsgi] = false
default[:graphite][:carbon][:line_receiver_interface] = "127.0.0.1"
default[:graphite][:carbon][:pickle_receiver_interface] = "127.0.0.1"
@@ -0,0 +1,28 @@
+# You may need to manually edit this file to fit your needs.
+# This configuration assumes the default installation prefix
+# of /opt/graphite/, if you installed graphite somewhere else
+# you will need to change all the occurances of /opt/graphite/
+# in this file to your chosen install location.
+
+<VirtualHost *:80>
+ DocumentRoot /opt/graphite/webapp
+ WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
+
+ WSGIDaemonProcess graphite user=www-data group=www-data threads=25
+ WSGIProcessGroup graphite
+
+ <Directory /opt/graphite/webapp>
+ Order deny,allow
+ Allow from all
+ </Directory>
+
+ # 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/"
+ <Directory @DJANGO_ROOT@/contrib/admin/media>
+ Order deny,allow
+ Allow from all
+ </Directory>
+</VirtualHost>

0 comments on commit b52335f

Please sign in to comment.