을 실행하려고 할 때 :WSGIServer 오류가 여기 내 스크립트의, 첫째 장고 응용 프로그램
#!/usr/bin/python
import sys, os
sys.path.append('/home/username/python')
sys.path.append("/home/username/python/flup")
sys.path.append("/home/username/python/django")
# more path stuff
os.environ['DJANGO_SETTINGS_MODULE'] = "project.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
바와 같이 here을 설명했다. 여기
그리고 내가 오류가 때 쉘에서 실행하려고 :
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
Status: 404 NOT FOUND
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<!-- more html which looks to be the correct output -->
내 질문은, 왜 FastCGI를 자동으로 전달하는 PARAMS이 아니다? 내가 도대체 뭘 잘못하고있는 겁니까? 내 웹 서버에서 스크립트를 실행하면 내부 서버 오류가 발생합니다. 대신 내 스크립트의 마지막 두 줄의
, 내가
from flup.server.fcgi import WSGIServer
from django.core.handlers.wsgi import WSGIHandler
WSGIServer(WSGIHandler()).run()
사용할 수 있습니다하지만 난 여전히 똑같은 오류가 ...
왜 mod_wsgi를 사용하지 않습니까? –
@ S.Lott : 몇 년 늦었지만 공유 된 호스트에있었습니다. WSGI에 액세스 할 수 없었습니다. – mpen