Running Python Application with gunicorn and nginx

Create a service file for gunicorn

Here

/home/ubuntu/myapp/wagtail2 = path to the folder where web application is.

/home/ubuntu/myapp/venv/bin/gunicorn = is where gunicorn installed inside virtualenv.

Change these path as required.

Restart gunicorn with

use following nginx config

Restart nginx

Add a Comment

Your email address will not be published. Required fields are marked *