Skip to content

Instantly share code, notes, and snippets.

@HouLinwei
Last active August 18, 2017 02:03
Show Gist options
  • Select an option

  • Save HouLinwei/3ef58aea0b059b47fa13b8e012ecd7e8 to your computer and use it in GitHub Desktop.

Select an option

Save HouLinwei/3ef58aea0b059b47fa13b8e012ecd7e8 to your computer and use it in GitHub Desktop.
serve a Django application with uWGSI.
# mysite_uwsgi.ini file
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir = /path/to/your/project
# Django's wsgi file
module = project.wsgi
# the virtualenv (full path)
home = /path/to/virtualenv
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 10
# the socket (use the full path to be safe
socket = /path/to/your/project/mysite.sock
# or http
# http=0.0.0.0:10086
harakiri=20
# ... with appropriate permissions - may be needed
# chmod-socket = 664
# clear environment on exit
vacuum = true
# Do not open this option.
# max-requests=5000
# If you don't want to run it on daemonsize, use option 'logto=/path/to/yourlog'
daemonize=uwsgi.log
pidfile=uwsgi.pid
# more detail, plz visit: https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment