无法将 lighttpd 配置为 web.py

cannot get lighttpd configured to web.py

我正在尝试在 ubuntu 14.04 上使用 lighttpd 服务器设置我的 web.py 应用程序。

我已按照以下教程进行操作,并按照所提到的进行操作。

http://crosbymichael.com/webpy-server-setup.html

https://superuser.com/questions/436580/setting-up-lighttpd-and-fastcgi-for-my-own-web-app

当我 运行 应用程序时,我收到以下错误

2016-11-25 10:54:23: (log.c.166) server started 2016-11-25 10:54:23: (mod_fastcgi.c.1103) the fastcgi-backend /var/www/index.py failed to start: 2016-11-25 10:54:23: (mod_fastcgi.c.1107) child exited with status 13 /var/www/index.py 2016-11-25 10:54:23: (mod_fastcgi.c.1110) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version. If this is PHP on Gentoo, add 'fastcgi' to the USE flags. 2016-11-25 10:54:23: (mod_fastcgi.c.1398) [ERROR]: spawning fcgi failed. 2016-11-25 10:54:23: (server.c.1021) Configuration of plugins failed. Going down.

错误表明 lighttpd 尝试启动您的应用程序但失败。手动 运行 尝试您的应用,看看它无法启动的原因。您可能缺少脚本所需的 Python 个模块。

顺便说一句,最新版本的 lighttpd (1.4.42+) 支持 Python 应用程序的 WSGI:

https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI

另请参阅:

https://redmine.lighttpd.net/projects/lighttpd/wiki/HowToPythonWSGI