2014-06-16 62 views
0

我在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 
+0

你可以發佈wsgi.py文件嗎? – elmonkeylp

回答

0

聽起來像是你沒有 'mysite的' 添加到蟒蛇路徑在你的wsgi.py中。

+0

是的,我錯過了我的路:)謝謝! –

+0

我有同樣的問題!你能告訴我你是如何解決這個問題的嗎? – Mix