基于 web.py 的程序开发起来还是非常简单的,但是我没想到在服务器上部署的时候却遇到了不少麻烦。我用的 web server 是 lighttpd,不能正常启动,查看错误日志,发现如下几行:
2009-12-15 19:48:04: (server.c.1503) server stopped by UID = 0 PID = 25128 2009-12-15 19:48:30: (log.c.166) server started
2009-12-15 19:48:30: (mod_fastcgi.c.1104) the fastcgi-backend /var/www/code.py failed to start:
2009-12-15 19:48:30: (mod_fastcgi.c.1108) child exited with status 1 /var/www/code.py
2009-12-15 19:48:30: (mod_fastcgi.c.1111) 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.
2009-12-15 19:48:30: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed. 2009-12-15 19:48:30: (server.c.931) Configuration of plugins failed. Going down.
经历了许多周折之后,问题终于解决掉──实际上不是仅仅一个问题。在这儿把经验分享一下,如果有人遇到同样的问题,至少可以少走一些弯路。请按照一下几点检查错误:
... Read full article: lighttpd, web.py, spawning fcgi failed