欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2/Agda, C++/Lisp/Haskell
UWSGI
来自开放百科 - 灰狐
(版本间的差异)
小 (→Install) |
小 (→Ngnix) |
||
| (未显示1个用户的7个中间版本) | |||
| 第3行: | 第3行: | ||
uWSGI 是一个快速、纯C语言、用户友好的 [[WSGI]] 服务器,面向专业的 [[Python]] 开发者。 | uWSGI 是一个快速、纯C语言、用户友好的 [[WSGI]] 服务器,面向专业的 [[Python]] 开发者。 | ||
| − | == | + | ==简介== |
| + | |||
| + | ==功能== | ||
| + | |||
| + | ==指南== | ||
make | make | ||
make -f Makefile.Py27 | make -f Makefile.Py27 | ||
| 第12行: | 第16行: | ||
return "Hello World" | return "Hello World" | ||
uwsgi --http :9090 --wsgi-file /var/www/hello.py | uwsgi --http :9090 --wsgi-file /var/www/hello.py | ||
| + | http://localhost:9090 | ||
==Ngnix== | ==Ngnix== | ||
| + | [https://nginx.org/en/docs/http/ngx_http_uwsgi_module.html Module ngx_http_uwsgi_module] | ||
| + | vim /usr/local/conf/nginx.conf | ||
| + | location / { | ||
| + | include uwsgi_params; | ||
| + | uwsgi_pass 127.0.0.1:9090; | ||
| + | } | ||
| + | uwsgi --socket 127.0.0.1:9090 --file /var/www/hello.py --callable app --processes 2 | ||
==链接== | ==链接== | ||
*[http://projects.unbit.it/uwsgi uWSGI主页] | *[http://projects.unbit.it/uwsgi uWSGI主页] | ||
| + | *[https://github.com/unbit/uwsgi uWSGI @ GitHub] | ||
| − | + | [[category:python]] | |
| − | + | [[category:web server]] | |
| − | [[ | + | [[category:WSGI]] |
| − | [[ | + | [[category:c programming language]] |
2020年12月17日 (四) 14:16的最后版本
uWSGI 是一个快速、纯C语言、用户友好的 WSGI 服务器,面向专业的 Python 开发者。
目录 |
[编辑] 简介
[编辑] 功能
[编辑] 指南
make
make -f Makefile.Py27
python uwsgiconfig.py --build
touch /var/www/hello.py
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return "Hello World"
uwsgi --http :9090 --wsgi-file /var/www/hello.py
http://localhost:9090
[编辑] Ngnix
vim /usr/local/conf/nginx.conf
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9090;
}
uwsgi --socket 127.0.0.1:9090 --file /var/www/hello.py --callable app --processes 2
[编辑] 链接
分享您的观点