Why gunicorn cannot find static files?

September 1, 2017 95 views
Django Ubuntu

Running Django dev server has no problem: 'python manage.py runserver 9000'
But if use gunicorn, it complains:

'http://innovindex.com/pubmed/static/js/jquery-3.2.1.min.js '

Why gunicorn cannot find a local jquery but Django can?

The settings are:

settings.py (seems not related):
STATIC_URL = '/pubmed/static/'

in '/etc/nginx/sites-enabled/django'

location /static {
   alias /home/django/innovindex/pubmed/static/;
}

And my app looks like this:

/home/django/innovindex

is where the 'manage.py' sits.

THANK YOU SO MUCH !!!

Be the first one to answer this question.