0
我測試開始Django應用程序時收到以下錯誤:導入錯誤:沒有模塊名爲django.core.wsgiWSGI休息
[Fri Feb 26 23:23:33 2016] [error] [client 100.9.129.136] mod_wsgi (pid=25312): Target WSGI script '/var/www/html/app_mgmt/app_core/wsgi.py' cannot be loaded as Python module.
[Fri Feb 26 23:23:33 2016] [error] [client 100.9.129.136] mod_wsgi (pid=25312): Exception occurred processing WSGI script '/var/www/html/app_mgmt/app_core/wsgi.py'.
[Fri Feb 26 23:23:33 2016] [error] [client 100.9.129.136] Traceback (most recent call last):
[Fri Feb 26 23:23:33 2016] [error] [client 100.9.129.136] File "/var/www/html/app_mgmt/app_core/wsgi.py", line 16, in <module>
[Fri Feb 26 23:23:33 2016] [error] [client 100.9.129.136] from django.core.wsgi import get_wsgi_application
[Fri Feb 26 23:23:33 2016] [error] [client 100.9.129.136] ImportError: No module named django.core.wsgi
我的httpd.conf看起來是這樣的: 的LoadModule wsgi_module模塊/ mod_wsgi.so #loaded上述
NameVirtualHost *:80
WSGIScriptAlias//var/www/html/app_mgmt/app_core/wsgi.py
WSGIPythonPath /var/www/html/app_mgmt
<Directory /var/www/html/app_mgmt>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
我wsgi.py樣子:
import os
import sys
sys.path.append("/var/www/html/app_mgmt")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app_mgmt.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
我安裝使用以下命令的mod_wsgi:
sudo yum install mod_wsgi
有誰知道我做錯了嗎?