[uwsgi]
- 指定IP端口 // 直接外部访问
http-socket = 127.0.0.1:8080
- 项目目录
chdir = /www/wwwroot/web/
- 指定项目的application
module = web.wsgi:application
- uwsgi启动用户名和用户组
uid = www
gid = www
- 启用主进程
master = true
- 指定Socket路径 //内部访问 #权限和nginx一样
socket = /www/wwwroot/web/script/uwsgi.sock
socket = :8080
- socket权限设置
chmod-socket = 755
- 进程个数
processes = 5
pidfile = /www/wwwroot/web/script/uwsgi.pid
- 自动移除unix Socket 和 Pid 文件 当服务停止的时候
vacuum = true
- 序列化接受的内容,如果可能的话
thunder-lock = true
- 启用线程
enable-threads = true
- 设置自动中断时间
harakiri = 30
- 设置缓冲
post-buffering = 4096
- 设置静态文件
static-map = /static=//www/wwwroot/mysite/static
- 设置日志目录
daemonize = /www/wwwroot/mysite/uwsgi.log
- 启动,重启,关闭
uwsgi --ini uwsgi.ini # 启动
uwsgi --reload uwsgi.pid # 重启
uwsgi --stop uwsgi.pid # 关闭
网友评论