0

apace と mod_wsgi を使用して Linux サーバーに Django アプリケーションをデプロイした後、以下のエラーが発生します -

[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229] mod_wsgi (pid=20033): Exception occurred processing WSGI script '/var/www/html/appletrade/django.wsgi'.
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229] Traceback (most recent call last):
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 272, in __call__
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     response = self.get_response(request)
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 169, in get_response
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 218, in handle_uncaught_exception
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     return callback(request, **param_dict)
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/utils/decorators.py", line 93, in _wrapped_view
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     response = view_func(request, *args, **kwargs)
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/views/defaults.py", line 30, in server_error
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     t = loader.get_template(template_name) # You need to create a 500.html template.
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/template/loader.py", line 157, in get_template
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     template, origin = find_template(template_name)
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]   File "usr/lib/python2.6/site-packages/django/template/loader.py", line 138, in find_template
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229]     raise TemplateDoesNotExist(name)
[Wed Apr 10 05:21:52 2013] [error] [client 117.199.125.229] TemplateDoesNotExist: 500.html

見逃した設定を取得できません。私を助けてください。

構成についてさらに情報が必要な場合はお知らせください。

4

1 に答える 1

1

debug=False で Django をデプロイするには。500.htmlテンプレート パスの 1 つにテンプレートを含める必要があります。という名前の空のファイルを作成するだけです500.html

ドキュメントの詳細情報:

https://docs.djangoproject.com/en/dev/topics/http/views/#the-500-server-error-view

于 2013-04-10T01:36:17.000 に答える