繁体   English   中英

在nginx ubuntu下服务多个gunicorn django实例

[英]serve multiple gunicorn django instances under nginx ubuntu

我需要在ubuntu上使用nginx以不同的域名在gunicorn上提供两个web应用程序(Django)。 我开始使用本教程: https : //www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04

使用它的人工作得很好。 然后,我尝试对第二个域执行相同的操作,但它为第二个域提供了502网关。 因此,我尝试按照以下教程进行操作: http : //michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/

我是您运行gunicorn启动脚本的部分:

sudo bin/gunicorn_start

我得到答复:

Starting webuildblack as root
    Traceback (most recent call last):
        File "/home/devin/webuildblack/bin/gunicorn", line 7, in <module>
            from gunicorn.app.wsgiapp import run
                ImportError: No module named 'gunicorn.app'; 'gunicorn' is not a package

您已将程序gunicorn.py命名为gunicorn.py gunicorn 重命名此文件,然后删除所有gunicorn.pyc文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM