Lighttpd通过FastCGI运行web.py程序
web.py是个很小的python框架,特点就是小,连session都没有实现人家就发布了。前几天KungfuRails大会上他们吹牛说Sinatra可以写出世界上最小的Webapp,但是有web.py的化,那个最小至少要加上个“之一”。 Web.py在Lighttpd上通过fastcgi运行的配置,可以在web.py的网站上找到文档: http://webpy.org/cookbook/fastcgi-lighttpd 实际我用的时候把静态的index.html用作首页,稍改动一下: server.document-root = “/home/sun/projects/sdostatweb” server.modules += ( “mod_fastcgi” ) server.modules += ( “mod_rewrite” ) server.port = 4000 mimetype.assign = ( “.html” => “text/html” ) index-file.names = ( “index.html” ) fastcgi.server = ( “/sdostatweb.py” => (( “socket” => “/tmp/fastcgi.socket”, “bin-path” => “/home/sun/projects/sdostatweb/sdostatweb.py”, “max-procs” => 5, “bin-environment” => ( “REAL_SCRIPT_NAME” => “” ), “check-local” [...]