server.modules += ( "mod_fastcgi" )
$SERVER["socket"] == "0.0.0.0:81"{
server.document-root = "/home/hg/hgserver/"
#下面是认证的配置
#auth.debug = 2
auth.backend = "plain"
auth.backend.plain.userfile = "/etc/lighttpd/lighttpd_plain.user"
#auth.backend = "htdigest"
#auth.backend.htdigest.userfile = "/etc/lighttpd/lighttpd.user"
auth.require = ("/" => (
"method" => "digest",
"realm" => "Mercurial Repository",
"require" => "valid-user"
#"require" => "user=see|user=test"
))
fastcgi.server=(
"/hg_fastcgi.fcgi" =>(
"hg" => (
"bin-path" => "/usr/bin/python /home/hg/hgserver/hg_fastcgi.py socket=/tmp/hg.socket-0",
"socket" => "/tmp/hg.socket",
"min-procs" => 1,
"max-procs" => 1,
"idle-timeout" => 120,
"check-local" => "disable",
)
),
)
##server.error-handler-404 = "/app.fcgi"
"^(/.*)$" => "/hg_fastcgi.fcgi$1",
)
}
附件中包含:google得来的文档、配置文件、脚本