2014-10-03 58 views
0
mod_wsgi Exception occurred processing WSGI script '/usr/share/graphite-web/graphite.wsgi' 

我只拷貝apache-graphite.conf到/ etc/apache/sites-available,爲什麼它會抱怨graphite.wsgi? Apache的graphite.conf的在Ubuntu 14上安裝apache .4的石墨錯誤

內容:

import os, sys 
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings' 

import django.core.handlers.wsgi 

application = django.core.handlers.wsgi.WSGIHandler() 


from graphite.logger import log 
log.info("graphite.wsgi - pid %d - reloading search index" % os.getpid()) 
import graphite.metrics.search 
+0

有你混合Apache的graphite.conf和graphite.wsgi? – kamaradclimber 2014-10-04 12:33:43

回答

0

graphite.wsgi是你的Apache網絡服務器callled接聽來電請求wsgi application

apache-graphite.conf站點定義了一個運行django的wsgi應用程序,它將使用石墨代碼處理請求。我想這看上去更像是這樣的:https://github.com/graphite-project/graphite-web/blob/0.9.x/examples/example-graphite-vhost.conf

graphite.wsgi通常是這樣的:https://github.com/graphite-project/graphite-web/blob/0.9.x/conf/graphite.wsgi.example