2014-07-23 79 views
0

我无法在我的Ubuntu服务器上运行我的Django应用程序。我正在按照这个教程http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/,我很确定我已经安装了所有的依赖关系。Django和Gunicorn问题

当我运行它正常工作:

python manage.py runserver 0.0.0.0:8000 

然而,当我运行:

gunicorn djangoproject:application --bind 127.0.0.1:8001 

我遇到这个错误:

2014-07-23 04:50:16 [19676] [INFO] Starting gunicorn 0.17.4 
2014-07-23 04:50:16 [19676] [INFO] Listening at: http://127.0.0.1:8001 (19676) 
2014-07-23 04:50:16 [19676] [INFO] Using worker: sync 
2014-07-23 04:50:16 [19681] [INFO] Booting worker with pid: 19681 
Failed to find application: 'djangoproject' 
2014-07-23 04:50:16 [19681] [INFO] Worker exiting (pid: 19681) 
2014-07-23 04:50:16 [19676] [INFO] Shutting down: Master 
2014-07-23 04:50:16 [19676] [INFO] Reason: App failed to load. 

任何帮助是非常赞赏。

感谢, Zee的

+0

什么是“instaryde”?错误是django项目没有找到。 – dhana

+0

试试这个在你的procfile网站:gunicorn instaryde.wsgi –

+0

对不起,应该说djangoproject – zee

回答

0

您需要添加WSGI文件路径

gunicorn djangoproject.wsgi:应用--bind = 127.0.0.1:8001

0

最近,我主持我的网站上Ubuntu服务器。我跟了这个教程,完美地为我工作

Installing Django application with nginx ......

我得到了同样的错误,当我第一次用数字海洋教程尝试。问题是gunicorn无法找到您的项目。尝试在你的gunicorn设置中加入--chdir/address/to/path选项