正在加载...

webpy-4 部署

部署就不用说太多。直接fastcgi

配置nginx

配置文件不贴了,主要讲webpy怎么写

安装flug

sudo pip install flup

webpy启动代码中写

def run_cgi(func, addr):
    return flups.WSGIServer(func, multiplexed=False, bindAddress=addr).run()


def start_fcgi():
    app = web.application(urls, globals())
    web.wsgi.runwsgi = lambda func, addr = None: flups.WSGIServer(func, multiplexed=False, bindAddress=addr).run()
    app.run()

即可