python uwsgi 配置(Python uwsgi configuration)

启动: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: 入口文件

————————

启动: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: automatic restart when uwsgin file changes
Callable: Flash needs to specify that flash instantiates the existing app
WSGI file: entry file