LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4841|回复: 2

求助:如何配置 lighttpd + FastCGI + Python 请兄弟们指教!

[复制链接]
发表于 2007-7-25 16:21:35 | 显示全部楼层 |阅读模式
最近想尝试一下用 lighttpd 换掉原先的 Apache

下载 lighttpd , 安装后访问不能...

郁闷中...

不知哪位兄弟有成功配置  lighttpd + FastCGI + Python 的经验
请指教!谢谢!


网上查到的例子,实验的时候返回 500, 修改相关权限后 返回 403,晕...

FastCGI配置:
## FastCGI programs have the same functionality as CGI programs,
## but are considerably faster through lower interpreter startup
## time and socketed communication
##
## Documentation: /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
##                http://www.lighttpd.net/documentation/fastcgi.html

server.modules   += ( "mod_fastcgi" )

## Start a FastCGI server for python test example
fastcgi.debug = 1
fastcgi.server    = ( ".fcgi" =>
                      ( "localhost" =>
                                        (
                          "socket" => "/tmp/fcgi.sock",
                          "min-procs" => 2
                                        )
                                      )
                                )




测试脚本:
#!/usr/local/bin/python
from flup.server.fcgi import WSGIServer

def myapp(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    return ['Hello World!\n']

WSGIServer(myapp, bindAddress = '/tmp/fcgi.sock').run()



请大家指点啊!
 楼主| 发表于 2007-7-26 16:44:34 | 显示全部楼层
找了几份文档,
分别讨论了
lighttpd + mod_cgi + python

lighttpd + mod_fastcgi + Django
lighttpd + mod_fastcgi + web.py

貌似关于 lighttpd + flup + python 并没有太多的资料...

残念...
回复 支持 反对

使用道具 举报

发表于 2008-7-15 19:43:36 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表