nginx和uwsgi安装的就不说了
hello,world应用
hw.py
def application(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
yield 'Hello World\n'
yield 'This is uWsgi application \n'
nginx的配置
location / {
uwsgi_pass 127.0.0.1:9090;
include uwsgi_params;
}
启动uwsgi
uwsgi -s :9090 -m ./hw.py
启动nginx
nginx
然后就可以访问了,http://localhost:8888/
Hello World This is uWsgi application