我按照这些说明通过uWSGI服务Python(Web2Py) 。 但是,Web服务器返回了一个错误:
uWSGI错误
找不到Python应用程序
直到我修改config.xmlconfiguration文件:
<uwsgi> <pythonpath>/var/web2py/</pythonpath> <app mountpoint="/"> <script>wsgihandler</script> </app> </uwsgi>
至:
<uwsgi> <pythonpath>/var/web2py/</pythonpath> <module>wsgihandler</module> </uwsgi>
<app>和<module>有什么区别? 为什么<module>工作,但不是<app>?
–app选项已弃用一年以上(如果使用稳定版本1.2 / 1.4,应在uWSGI日志中报告)。 对于wsgi应用程序,您可以使用–module(用于python模块)和–wsgi-file(用于.wsgi文件)