Gunicorn setup: no application module specified

I am trying to deploy a django project with NGINX and gunicorn. I keep getting 502 Bad Gateway. I have been working without interruption in this for the past few days, and I cannot seem that it is deployed. I went through three tutorials on the digital ocean, but they are not correct, obviously.

I keep getting 502 bad gateways, or if I try to use manage.py runningerver, I get 400 bad requests.

I think my problem is with the gun. When I enter gunicorn -config, it says

usage: gunicorn [OPTIONS] [APP_MODULE] gunicorn: error: No application module specified.

Every bit of documentation that I can find says that it simply types gunicorn wsgi: application, but when I do this, it says "workers failed to load." How to install the application module?

+4
source share
1 answer

Assuming you have nginx proxying on port 8001, you want to do this:

gunicorn -b 127.0.0.1:8001 your_project_name.wsgi: application

You need to run this from the project folder (where the manage.py file is located)

+7
source

All Articles