我在ubuntu 14.04上使用apache2.4,我從django文檔啓動了新項目,然後我檢查了使用python runserver運行的應用程序,它工作的很好,但在我的服務器apache2中,我看到500錯誤。我的配置: /etc/apache2/sites-available/django.td.confdjango mod wsgi apache2配置
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName django.td
#DocumentRoot/
WSGIScriptAlias//home/s/py/django/mysite/mysite/wsgi.py
Alias /adminmedia/ /opt/python2.7/lib/python2.7/site-packages/django/contrib/admin/media/
<Directory "/home/s/py/django/mysite/mysite/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
和最新的日誌:
[Mon Jun 16 17:11:27.892188 2014] [:error] [pid 4054] [client 127.0.0.1:59541] ImportError: Could not import settings 'mysite.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named mysite.settings
你可以發佈wsgi.py文件嗎? – elmonkeylp