web.py nginx uwsgi
web.py nginx uwsgi
nginx.conf server部分配置
server
{
listen 9191;
server_name t.com;
location / {
uwsgi_pass 127.0.0.1:9192;
include uwsgi_params;
access_log off;
}
}
cd /var/www/webpy
vi index.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import web
urls = ("/.*", "hello")
class hello:
def GET(self):
return 'Hello, world!'
app = web.application(urls, globals())
application = app.wsgifunc()
uwsgi -s 127.0.0.1:9192 -w index
访问 http://localhost:9191

浙公网安备 33010602011771号