【发布时间】:2011-01-08 07:50:11
【问题描述】:
Win 2003 标准 IIS 6 上的 Python 2.6.2 / Django 1.0.2。
IIs 正在运行两个具有以下目录结构的 django 站点:
根/http/WEBSITE1 根/http/WEBSITE2
两个站点都有自己的应用程序池;每个站点都有自己的 pyISAPIe.dll 实例。
WEBSITE1 是可访问的(服务于测试 django 页面)。但是,浏览器会为 WEBSITE2 生成以下内容:
内部服务器错误 处理此请求时出错。
请求处理程序失败
Traceback(最近一次调用最后一次): 文件“D:\Python26\lib\site-packages\Http\Isapi.py”,第 67 行,在请求中 返回 RunWSGI(Handler, Base=Base) RunWSGI 中的文件“D:\Python26\lib\site-packages\Http\WSGI.py”,第 155 行 结果 = 应用程序(环境,StartResponse) 调用中的文件“D:\Python26\lib\site-packages\django\core\handlers\wsgi.py”,第 241 行 response = self.get_response(request) 文件“D:\Python26\lib\site-packages\django\core\handlers\base.py”,第 122 行,在 get_response return self.handle_uncaught_exception(请求,解析器,sys.exc_info()) 文件“D:\Python26\lib\site-packages\django\core\handlers\base.py”,第 166 行,在 handle_uncaught_exception 返回回调(请求,**param_dict) server_error 中的文件“D:\Python26\lib\site-packages\django\views\defaults.py”,第 23 行 t = loader.get_template(template_name) # 你需要创建一个 500.html 模板。 文件“D:\Python26\lib\site-packages\django\template\loader.py”,第 81 行,在 get_template 来源,来源 = find_template_source(template_name) 文件“D:\Python26\lib\site-packages\django\template\loader.py”,第 74 行,在 find_template_source 提出 TemplateDoesNotExist,名称 django.template.TemplateDoesNotExist: 500.html
在我看来,位于 root/pytho26/Lib/site-packages/Http 中的“Isapi.py”与此有关,因为“os.environ[”DJANGO_SETTINGS_MODULE”] = “WEBSITE1.settings”
如何修改或定位此文件,以便两个站点独立运行。
【问题讨论】: