[英]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.