uwsgi 常用命令
2019-01-14 本文已影响0人
醋留香
uwsgi --chdir=/path/to/your/project
--module=mysite.wsgi:application
--env DJANGO_SETTINGS_MODULE=mysite.settings
--master --pidfile=/tmp/project-master.pid
--socket=127.0.0.1:49152 \ # can also be a file
--processes=5 \ # number of worker processes
--uid=1000 --gid=2000 \ # if root, uwsgi can drop privileges
--harakiri=20 \ # respawn processes taking more than 20 seconds
--max-requests=5000 \ # respawn processes after serving 5000 requests
--vacuum \ # clear environment on exit
--home=/path/to/virtual/env \ # optional path to a virtualenv
--daemonize=/var/log/uwsgi/yourproject.log # background the process