Devin Jackson Devin Jackson - 6 months ago 65
Python Question

serve multiple gunicorn django instances under nginx ubuntu

I need to serve up two webs apps (Django) on gunicorn under different domain names using nginx on ubuntu. I started using this tutorial:

It worked just fine for one using that. Then I tried to do the same thing for the second but it gives me a 502 gateway for the second domain. So I tried following this tutorial:

I'm at the part where you run the gunicorn start script:

sudo bin/gunicorn_start

I get back the response:

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


You have named your program like the gunicorn-package. Rename your this file and remove any gunicorn.pyc file.