uwsgi安装和测试
来源:互联网 发布:matlab分水岭算法函数 编辑:程序博客网 时间:2024/05/16 06:04
借鉴: http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html
1,下载并安装:
wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gztar zxvf uwsgi-latest.tar.gzcd <dir>make2,Hello WorldLet’s start with a simple “Hello World” example (this is for Python 2.x, Python 3.x requires the returned string to be bytes, see lower):
def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return ["Hello World"](save it as foobar.py).
As you can see, it is composed of a single Python function. It is called “application” as this is default functionthat the uWSGI Python loader will search for (but you can obviously customize it).
The Python 3.x version is the following:
def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return [b"Hello World"]Deploy it on HTTP port 9090
Now start uWSGI to run an HTTP server/router passing requests to your WSGI application:
./uwsgi --http :9090 --wsgi-file foobar.py
0 0
- uwsgi安装和测试
- 安装python和uwsgi
- uWsgi的安装与测试
- nginx和uwsgi安装配置
- 安装Uwsgi
- Nginx,uWSGI,Django安装和部署
- uWSGI+Nginx+Django安装和配置
- ubuntu12.04 安装 uWsgi
- uwsgi安装使用
- nginx+uwsgi安装出错
- nginx+uwsgi+django安装
- uWSGI+Nginx安装、配置
- 关于uwsgi的安装
- nginx和uwsgi配置
- uwsgi概念和作用
- centOS6 安装 uwsgi 报错
- Django Nginx+uwsgi 安装配置
- Nginx+uWSGI安装与配置
- 2013 Phuket Regional
- 首页标题数字排序列表前三变色
- 校园wifi上网,不可不知道之wifi共享精灵
- 04 左旋转字符串
- openssl编程轻松入门(含完整示例)
- uwsgi安装和测试
- BlueTooth: 蓝牙
- 系统下安装SQL2005(SQL Server 2005)图文教程
- sed命令基本用法
- ArcGIS中标注的基本概念
- 《Mac OS X 背后的故事》读后记
- android animation小结(1)
- C++ virtual 总结
- Ubuntu 12.04 取消了Server版本的内核