Created
May 14, 2015 06:55
-
-
Save fxlv/802358e6422848f5fd88 to your computer and use it in GitHub Desktop.
Graphite apache virtualhost config
This file contains hidden or 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 graphite | |
DocumentRoot "/usr/local/share/graphite-web/content/" | |
# 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 inactivity-timeout=120 display-name=graphite | |
WSGIProcessGroup graphite | |
WSGIApplicationGroup graphite | |
WSGIImportScript /usr/local/etc/graphite/graphite.wsgi process-group=graphite application-group=graphite | |
# XXX You will need to create this file! There is a graphite.wsgi.example | |
# file in this directory that you can safely use, just copy it to graphite.wgsi | |
WSGIScriptAlias / /usr/local/etc/graphite/graphite.wsgi | |
Alias /content/ /usr/local/share/graphite-web/content/ | |
<Location "/content/"> | |
SetHandler None | |
</Location> | |
# XXX 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/local/lib/python2.7/site-packages/django | |
<Location "/media/"> | |
SetHandler None | |
</Location> | |
Alias /static/ "/usr/local/lib/python2.7/site-packages/django/contrib/admin/static/" | |
<Location "/static/"> | |
SetHandler None | |
</Location> | |
<Directory "/usr/local/lib/python2.7/site-packages/django/contrib/admin/static/"> | |
AllowOverride All | |
Options All | |
Require all granted | |
</Directory> | |
# The graphite.wsgi file has to be accessible by apache. It won't | |
# be visible to clients because of the DocumentRoot though. | |
<Directory /usr/local/etc/graphite/> | |
AllowOverride All | |
Options All | |
Require all granted | |
</Directory> | |
<Directory /usr/local/share/graphite-web/content/> | |
AllowOverride All | |
Options All | |
Require all granted | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment