我正在尝试将一个非常简单的django应用程序部署到linode,但我一直得到“未处理的异常/应用程序抛出了未处理的异常”,这非常无益。我正在使用nginx作为我的网络服务器,我已经进入错误日志找到这个:
2013/07/13 11:41:52 [error] 6673#0: *1 FastCGI sent in stderr:
"Traceback (most recent call last): File
"/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 558, in
run
protocolStatus, appStatus = self.server.handler(self) File "/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py", line 1118, in
handler
result = self.application(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py",
line 255, in __call__
response = self.get_response(request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
line 178, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File
"/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py",
line 217, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info) File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line
69, in technical_500_response
html = reporter.get_traceback_html() File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line
297, in get_traceback_html
c = Context(self.get_traceback_data()) File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line
255, in get_traceback_data
frames = self.get_traceback_frames() File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line
402, in get_traceback_frames
pre_context_lineno, pre_context, context_line, post_context = self._get_lines_from_file(filename, lineno, 7, loader, module_name)
File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py",
line 383, in _get_lines_from_file
context_line = source[lineno].strip('\n') IndexError: list index out of range" while reading response header from upstream, client:
xxx.xxx.xxx.xxx, server: xxx.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8080", host: "www.xxx.com
我已经做了大量的在线搜索,但到目前为止找不到任何可以帮助我的事情。我知道nginx至少部分正确配置,因为我可以转到我的静态目录并从那里拉文件没有问题。所以它与nginx和django之间的连接有关,但我真的不知道问题是什么。有什么想法吗?