Nginx配置如下:server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name flask.blog.gowhich.dev;
location / {
include uwsgi_params;
uwsgi_pass 0.0.0.0:3032;
}
}uwsgi 【uwsgi.xml】配置如下:
/Users/davidzhang/python/python_project/flask_blog_small_1
flask_blog
app
0.0.0.0:3032
/var/log/uwsgi.flask.blog.log
4
启动uwsgi和nginx便可完成部署;这里的端口号只要保证与uwsgi的端口号一直就可以,不用考虑flask自己运行的脚本