简体   繁体   中英

Django deployment issues with linux mod_wsgi

After deploying my django application on linux server wit apace and mod_wsgi I am getting below errors -

[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

I am not able to get what configuration I have missed. Please help me.

Let me know if any more information about configuration is required.

To Deploy Django on debug=False. You have to include a 500.html template in one of your template paths. You can just create an empty file named 500.html

More Info in the docs:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM