【发布时间】:2011-08-22 17:31:05
【问题描述】:
我刚刚从 django 1.2.4 升级到 1.3。
我将 nginx 与 fastcgi 结合使用,出于某种原因,每次我访问页面时都会收到此错误:
Unhandled Exception
An unhandled exception was thrown by the application.
任何想法可能是什么问题?
【问题讨论】:
-
您能否将 pastebin 添加到您的 error.log 中,也许还有配置文件。
-
@ashwoods 我在 /var/log/nginx/localhost.error_log 中找到了一些东西:文件“/usr/local/lib/python2.6/dist-packages/django/core/handlers/base .py",第 51 行,在 load_middleware 中引发异常。ImproperlyConfigured('Middleware module "%s" does not defined a "%s" class' % (mw_module, mw_classname)) ImproperlyConfigured: Middleware module "django.middleware.http" does从上游读取响应标头时未定义“SetRemoteAddrFromForwardedFor”类”,客户端:192.168.1.1,服务器:mysite.com,请求:“GET /home/ HTTP/1.1”,上游:“fastcgi://127.0.0.1: 1234”,主机:“mysite.com”
标签: django nginx fastcgi django-settings mod-fastcgi