我正在运行在Django中开发的Web应用程序。运行应用程序时,它会给出内部服务器错误。
这是apache日志
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] mod_wsgi (pid=554): Target WSGI script '/home/randUser/DisCern/DisCern/wsgi.py' cannot be loaded as Python module.
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] mod_wsgi (pid=554): Exception occurred processing WSGI script '/home/randUser/DisCern/DisCern/wsgi.py'.
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] Traceback (most recent call last):
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] File "/home/ankesh/DisCern/DisCern/wsgi.py", line 25, in <module>
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] application = get_wsgi_application()
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] File "/home/ankesh/DisCern/env/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] django.setup()
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] File "/home/ankesh/DisCern/env/lib/python2.7/site-packages/django/__init__.py", line 20, in setup
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] File "/home/ankesh/DisCern/env/lib/python2.7/site-packages/django/conf/__init__.py", line 46, in __getattr__
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] self._setup(name)
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] File "/home/ankesh/DisCern/env/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] self._wrapped = Settings(settings_module)
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] File "/home/ankesh/DisCern/env/lib/python2.7/site-packages/django/conf/__init__.py", line 98, in __init__
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] % (self.SETTINGS_MODULE, e)
[Fri May 27 23:15:32 2016] [error] [client 203.110.245.243] ImportError: Could not import settings 'DisCern.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named DisCern.settings
这是wsgi.py文件
import os
import sys
import site
# Add the site-packages of the chosen virtualenv to work with
site.addsitedir('~/DisCern/env/lib/python2.7/site-packages')
# Add the app's directory to the PYTHONPATH
sys.path.append('/home/ankesh/DisCern/DisCern')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DisCern.settings")
# Activate your virtual env
activate_env=os.path.expanduser("/home/ankesh/DisCern/env/bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
可能出现的错误是什么?