2013-12-12 5 views
0

우분투에 흑연 0.9.10이 있습니다. 13./opt/graphite/bin 디렉토리에 'run-graphite-devel-server.py'스크립트를 실행하면 서버가 나타납니다.흑연 설치 던지기 오류

SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS) 

문제를 해결하는 방법에 대한 아이디어/문제를 해결 : I 포트 8080에 URL을 액세스 할 때, 나는 다음 (500 내부 서버) 오류가 발생합니다.

요청 헤더 :

Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
Accept-Encoding gzip, deflate 
Accept-Language en-US,en;q=0.5 
Connection keep-alive 
Host 192.168.100.100:8080 
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 

응답 헤더 : 당신이 당신의 웹 서버에 흑연 가상 호스트 파일에 access controls을 설정해야합니다 같은

Content-Encoding gzip 
Content-Length 592 
Content-Type text/html; charset=utf-8 
Date Thu, 12 Dec 2013 15:39:53 GMT 
Server WSGIServer/0.1 Python/2.7.5+ 
Vary Accept-Encoding 

답변

1

AT- 기본입니다 흑연/webapp/흑연. (로컬 주소가 192.168.100.100 인 경우) 예를 들어 :

ALLOWED_HOSTS = ['localhost', '192.168.100.100'] 

장고는 ALLOWED_HOSTS 기준을 적용 할 나타납니다. 나는이 변화가 없이는 진전을 이룰 수 없었다. 희망이 도움이됩니다.

1

보인다. 당신이 아파치를 사용하는 경우 그것은

<Directory /opt/graphite/conf/> 
     Order deny,allow 
     Allow from all 
</Directory> 

로 삼았 보일 수 있습니다, 파일은 문제가 app_settings/settings.py에서/옵션 /에서 ALLOWED_HOSTS 섹션을 추가하여 해결되었습니다 /etc/httpd/conf.d/graphite-vhost.conf

+0

감사합니다. 공유 해 주셔서 감사합니다. –