【发布时间】:2014-06-16 15:23:13
【问题描述】:
我在 ubuntu 14.04 上使用 apache2.4,我从 django 文档开始了新项目,然后我检查了使用 python runserver 运行的应用程序,它运行良好,但在我的服务器 apache2 中我看到 500 错误。我的配置: /etc/apache2/sites-available/django.td.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
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 文件吗?
标签: python django ubuntu apache2 mod-wsgi