创建 Graphite 的虚拟主机配置:/etc/httpd/conf.d/graphite.conf,创建方法如下: cat > /etc/httpd/conf.d/graphite.conf Listen 8080
# 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 *:8080> ServerName graphite DocumentRoot "/opt/graphite/webapp"
# 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
# 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 / /opt/graphite/conf/graphite.wsgi
Alias /content/ /opt/graphite/webapp/content/ <Location "/content/"> SetHandler None </Location>
# 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/ "/usr/lib/python2.4/site-packages/django/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 /opt/graphite/conf/> Order deny,allow Allow from all </Directory>
</VirtualHost>
配置mod_wsgi模块 在 /etc/httpd/conf.d/wsgi.conf文件中添加以下两行: LoadModule wsgi_module modules/mod_wsgi.so WSGISocketPrefix /var/run/wsgi
|