python uwsgi 配置

启动:uwsgi --ini xxx.ini

重启:uwsgi --reload xxx.pid

停止:uwsgi --stop xxx.pid


ini 文件

[uwsgi]
chdir = /vagrant/python_test
master = true
processes = 1
wsgi-file=app.py
chmod-socket = 666
vacuum = true
daemonize = /var/log/uwsgi.log
;socket = /etc/nginx/mysite.sock
;socket = 127.0.0.1:8099
http=0.0.0.0:80
callable=app
py-autoreload = 1


py-autoreload =1 : uwsgin 文件改变自动重启
callable :flask 需要 指定flask 实例化 既app
wsgi-file: 入口文件

posted @ 2021-11-24 17:58  Carl-  阅读(137)  评论(0编辑  收藏  举报