Advertisement
danielhilst

graphite-vhost.conf

Sep 5th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. # This needs to be in your server's config somewhere, probably
  2. # the main httpd.conf
  3. # NameVirtualHost *:80
  4.  
  5. # This line also needs to be in your server's config.
  6. # LoadModule wsgi_module modules/mod_wsgi.so
  7.  
  8. # You need to manually edit this file to fit your needs.
  9. # This configuration assumes the default installation prefix
  10. # of /opt/graphite/, if you installed graphite somewhere else
  11. # you will need to change all the occurances of /opt/graphite/
  12. # in this file to your chosen install location.
  13.  
  14. <IfModule !wsgi_module.c>
  15. LoadModule wsgi_module modules/mod_wsgi.so
  16. </IfModule>
  17.  
  18. # XXX You need to set this up!
  19. # Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
  20. WSGISocketPrefix run/wsgi
  21.  
  22. <VirtualHost *:8080>
  23. # ServerName graphite
  24. DocumentRoot "/opt/graphite/webapp"
  25. ErrorLog /opt/graphite/storage/log/webapp/error.log
  26. CustomLog /opt/graphite/storage/log/webapp/access.log common
  27.  
  28. # I've found that an equal number of processes & threads tends
  29. # to show the best performance for Graphite (ymmv).
  30. WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
  31. WSGIProcessGroup graphite
  32. WSGIApplicationGroup %{GLOBAL}
  33. WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
  34.  
  35. # XXX You will need to create this file! There is a graphite.wsgi.example
  36. # file in this directory that you can safely use, just copy it to graphite.wgsi
  37. WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
  38.  
  39. Alias /content/ /opt/graphite/webapp/content/
  40. <Location "/content/">
  41. SetHandler None
  42. </Location>
  43.  
  44. # XXX In order for the django admin site media to work you
  45. # must change @DJANGO_ROOT@ to be the path to your django
  46. # installation, which is probably something like:
  47. # /usr/lib/python2.6/site-packages/django
  48. Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/"
  49. <Location "/media/">
  50. SetHandler None
  51. </Location>
  52.  
  53. # The graphite.wsgi file has to be accessible by apache. It won't
  54. # be visible to clients because of the DocumentRoot though.
  55. <Directory /opt/graphite/conf/>
  56. Order deny,allow
  57. Allow from all
  58. </Directory>
  59.  
  60. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement