简体   繁体   English

Apache错误地配置了httpd.conf

[英]Apache misconfiguring httpd.conf

I uploaded the httpd.conf file for the staging django server to the live server and restarted it and that brought the site down. 我将暂存django服务器的httpd.conf文件上传到实时服务器,然后重新启动它,这使站点瘫痪了。 After returning the right file restarting it and stopping staging server I get internal server error roughly once for every 5 refreshes on the page that shows missing info for top_menu 返回正确的文件后,重新启动它并停止登台服务器,在显示top_menu缺少信息的页面上,每隔5次刷新,我大top_menu一次内部服务器错误

[Fri Nov 13 11:38:41.793432 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]     result = block.nodelist.render(context)
[Fri Nov 13 11:38:41.793440 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]   File "/home/kbuzz/lib/python2.7/django/template/base.py", line 844, in render
[Fri Nov 13 11:38:41.793452 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]     bit = self.render_node(node, context)
[Fri Nov 13 11:38:41.793461 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]   File "/home/kbuzz/lib/python2.7/django/template/base.py", line 858, in render_node
[Fri Nov 13 11:38:41.793473 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]     return node.render(context)
[Fri Nov 13 11:38:41.793481 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]   File "/home/kbuzz/webapps/django/lib/python2.7/mptt/templatetags/mptt_tags.py", line 284, in render
[Fri Nov 13 11:38:41.793495 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]     queryset = self.queryset_var.resolve(context)
[Fri Nov 13 11:38:41.793504 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]   File "/home/kbuzz/lib/python2.7/django/template/base.py", line 734, in resolve
[Fri Nov 13 11:38:41.793516 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]     value = self._resolve_lookup(context)
[Fri Nov 13 11:38:41.793524 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]   File "/home/kbuzz/lib/python2.7/django/template/base.py", line 780, in _resolve_lookup
[Fri Nov 13 11:38:41.793537 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256]     (bit, current))  # missing attribute
[Fri Nov 13 11:38:41.793580 2015] [wsgi:error] [pid 130327:tid 139718655588096] [remote 127.0.0.1:25256] VariableDoesNotExist: Failed lookup for key [top_menu] in u"[{'False': False, 'None': None, 'True': True}, {}]"

which goes to this context proccessor 'top_menu':Page.objects.filter(top_menu=True, visible=True), and returns the info correctly when I run it from the shell. 转到此上下文处理程序'top_menu':Page.objects.filter(top_menu=True, visible=True),并从外壳程序运行时正确返回信息。

>>> from pages.models import *
>>> Page.objects.filter(top_menu=True, visible=True)
[<Page: Home>, <Page: What’s On>, <Page: What’s On :: Today>, <Page: What’s On :
: This Weekend>, <Page: What’s On :: This Month>, <Page: Movies>, <Page: Movies
:: Now Showing>, <Page: Lifestyle>, <Page: Biz Directory>, <Page: Buy&Sell >, <P
age: Galleries>, <Page: Newsletters>]
>>>

I want to reset the apache server to start working correctly now. 我想重置apache服务器以立即开始正常工作。

我发现错误是由于wsgi中的sys路径指向错误的路径,重新启动服务器导致错误开始出现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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