nginx + uwsgi配置flask
[uwsgi] socket = 127.0.0.1:8008 chdir = /home/www/python_flask_shop module = python_flask_shop.wsgi daemonize = uwsgi.log py-autoreload = 1 # 这个是表示实时更新的,但是只有这个还是不行 pidfile = /data/www/python_flask_shop/uwsgi.pid # 这个表示生成的uwsgi进程 wsgi-file = /home/www/python_flask_shop/run.py # 要执行的文件 callable = app processes = 4 master = true threads = 2 server{ listen 80; server_name 我的域名; charset UTF-8; client_max_body_size 75M; location / { include uwsgi_params; uwsgi_pass 127.0.0.1:8008; # flask运行端口 uwsgi_read_timeout 2; } }