python+uwsgi+nginx部署

nginx配置

/etc/nginx/conf.d/default.conf
location / {
    include uwsgi_params;
    uwsgi_pass 127.0.0.1:9000;
}

uwsgi配置

uwsgi.ini

[uwsgi]
socket = 127.0.0.1:9000
pythonpath=/path/flask_pro
py-autoreload = 1  # 代码修改自动重载
module=server
callable=app
master = true         
processes= 4
threads= 2
pidfile=uwsgi.pid
daemonize=uwsgi.log
$ uwsgi --ini uwsgi.int
$ uwsgi --reload uwsgi.pid

MySQL配置:

   设置密码登录root:

update user set authentication_string=PASSWORD('000000'), plugin='mysql_native_password' where user='root';

猜你喜欢

转载自www.cnblogs.com/ccqk/p/11260792.html
今日推荐