Another reason could be; you are accessing your application through nginx using proxy but you did not add gunicorn.sock
file for proxy with gunicorn.
You need to add a proxy file path in nginx configuration.
location / {
include proxy_params;
proxy_pass http://unix:/home/username/myproject/gunicorn.sock;
}
Here is a nice tutorial with step by step implementation of this
Note: if you did not created anyname.sock
file you have to create if first, either use above or any other method or tutorial to create it.