Skip to content

Instantly share code, notes, and snippets.

@ncole458
Last active October 2, 2017 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ncole458/68d2df1bf94dd8b78a1f94ca678f955e to your computer and use it in GitHub Desktop.
Save ncole458/68d2df1bf94dd8b78a1f94ca678f955e to your computer and use it in GitHub Desktop.
Gunicorn for Django/nginx
# gunicorn.conf
description "Gunicorn app server for Django Project"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
setuid username
setgid www-data
chdir /django/django_projects/ProjectDir/
exec /opt/bitnami/python/bin/gunicorn \
--name=Project \
--pythonpath=Project \
--bind=127.0.0.1:9000 \
--config /etc/gunicorn.d/gunicorn.py \
ProjectAPI.wsgi:application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment