快速使用uwsgi部署
之前尝试在阿里云部署一个bottle.py写的web服务,选择了unbuntu12.04,一穷二白的ubuntu上用uwsgi部署还挺简单的。这里简单记录一下。
先要改一改程序代码,声明一个application
1
| |
然后安装uwsgi,demo.py就是修改过的bottle的代码。
这里我遇到了— unavailable modifier requested: 0 --,要安装uwsgi-plugin-python,并且uwsgi启动时候添加--plugin python
一些uwsgi的操作看这里
1 2 | |
安装nginx
1 2 3 4 5 6 7 | |
最后配置nginx。默认安装路径在/usr/local/nginx/conf/nginx.conf
1 2 3 4 5 6 7 8 9 10 11 | |
自此搞定
via:
- http://stackoverflow.com/questions/10748108/nginx-uwsgi-unavailable-modifier-requested-0
- http://lists.unbit.it/pipermail/uwsgi/2011-November/002923.html
- http://aaronsnow.tumblr.com/post/11560674160/nginx-uwsgi-bottle-py
- https://groups.google.com/forum/?fromgroups=#!topic/bottlepy/wRfgm4obLXk
- http://blog.felixc.at/2011/01/ubuntu-uwsgi-nginx-bottle-configuration/
- http://apt-blog.net/moinmoin-on-nginx-via-fastcgi-and-uwgi
- http://down.chinaz.com/server/201112/1467_1.htm




