不幸的是我的网站返回了500个错误。在
apache日志不是很具体,所以我真的不知道该怎么做。在升级之前一切都很好。在
我认为这可能是一个权限错误。如何设置使用WSGI的权限?在
或者你知道为什么这个问题会因为另一个原因发生吗?在
apache配置:
...
WSGIDaemonProcess aegee-stuttgart.org python-path=/home/sysadmin/public_html/aegee-stuttgart.org:/home/sysadmin/.virtualenvs/django/lib/python2.7
WSGIProcessGroup aegee-stuttgart.org
WSGIScriptAlias / /home/sysadmin/public_html/aegee-stuttgart.org/aegee/wsgi.py
...
在wsgi.py公司名称:
^{pr2}$在错误.log公司名称:
mod_wsgi (pid=23202): Exception occurred processing WSGI script '/home/sysadmin/p$
Traceback (most recent call last):
File "/home/sysadmin/public_html/aegee-stuttgart.org/aegee/wsgi.py", line 31, i$
return super(WSGIEnvironment, self).__call__(environ, start_response)
File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 189,$
response = self.get_response(request)
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 218,$
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 264,$
if resolver.urlconf_module is None:
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 395, $
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/sysadmin/public_html/aegee-stuttgart.org/aegee/urls.py", line 8, in$
from .userprofile.views import AccountPersonalInfoView
File "/home/sysadmin/public_html/aegee-stuttgart.org/aegee/userprofile/views.py$
from django.contrib.auth.mixins import LoginRequiredMixin
ImportError: No module named mixins
使用:
不是你所拥有的。可以使用
python-path
来引用虚拟环境,但使用的目录不正确。使用python-home
,并将其设置为sys.prefix
为虚拟环境提供的相同目录。在因为您使用了错误的目录,所以它是从主Python安装中获取Django,而不是从虚拟环境中获取Django。在
相关问题 更多 >
编程相关推荐