1.比较直接,直接执行flask的run.py
sudo python run.py
2.nginx + flask,代理
server { listen 80; server_name ; #记得做下本地hosts location / { proxy_pass http://127.0.0.1:8989; }}
3.nginx +gunicorn+ flask
kkk@bogon:~$ cat gunicorn.conf workers = 2process = 4bind = '0.0.0.0:8989'proc_name = 'app'pid = 'usr/local/nginx/gunicorn.pid' #进入网站目录,执行:#cd /data/www/flask/yw#sudo gunicorn --config /usr/local/nginx/conf/gunicorn.conf run:app 、#run代表run.py,app代表run里的对象
4.nginx+ uwsgi +flask
请查看上一篇],http://my.oschina.net/jk409/blog/366084