jdeniau
3/27/2013 - 3:32 PM

Graphite - VirtualHost

Graphite - VirtualHost

<VirtualHost *:80>
    ServerName  graphite.example.com
    ServerAlias graphite.example.com

    DocumentRoot "/opt/graphite/webapp"

    WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
    WSGIProcessGroup graphite
    WSGIApplicationGroup %{GLOBAL}
    WSGIImportScript /opt/graphite/conf/graphite.wsgi process-group=graphite application-group=%{GLOBAL}

    WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi 

    <Directory />
        Options FollowSymLinks
        AllowOverride All 
    </Directory>

    Alias /content/ /opt/graphite/webapp/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/"
    <Location "/media/">
            SetHandler None
    </Location>

    # The graphite.wsgi file has to be accessible by apache. It will not
    # be visible to clients because of the DocumentRoot though.
    <Directory /opt/graphite/conf/>
            Order deny,allow
            Allow from all
    </Directory>
</VirtualHost>