Gullery and Lighttpd Conditional

Hi guys,

this config file of lighttpd is killing me! I’m using the rails gullery
app and I’m trying to integrate it to my lighttpd setup. I tried it on
mongrel and it works perfectly fine. When I use lighttpd on it, lighttpd
can’t seem to find the fastcgi or something…I was able to already
succesfully use a nested conditional for my first site now I’m working
on this second site. Can anyone help me out and see what I have wrong
here?

server.modules = (“mod_rewrite”, “mod_alias”, “mod_accesslog”,
“mod_fastcgi”)
server.port = 80
server.document-root = “/home/lighttpd/domain1.com/http/chat/public”
server.pid-file = “/var/run/lighttpd.pid”
accesslog.filename = “/var/log/lighttpd/lighttpd.access.log”
server.errorlog = “/var/log/lighttpd/lighttpd.error.log”
server.indexfiles = ( “index.html” )

mimetype.assign = (
<mime types goes here…it’s a long list…so I cut it out.
)

var.mycoolapp = “/home/lighttpd/domain1.com/http/chat”
#var.mycoolapp2 = “/home/lighttpd/domain1.com/http/chat_demo”
$HTTP[“host”] =~ “(^|.)domain1.com$” {
server.document-root = var.mycoolapp + “/public”
url.rewrite = ( “^/$” => “index.html”, “^([^.]+)$” => “$1.html” )
server.error-handler-404 = “/dispatch.fcgi”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
( “min-procs” => 1,
“max-procs” => 1,
“socket” => “/tmp/fcgi.socket”,
“bin-path” => var.mycoolapp + “/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “production” )
)))
$HTTP[“url”] =~ “^/chat_demo/” {
server.document-root =
“/home/lighttpd/domain1.com/http/chat_demo/public/”
alias.url = ( “/chat_demo/” =>
“/home/lighttpd/domain1.com/http/chat_demo/public/” )
accesslog.filename =
“/var/log/lighttpd/domain1.com/chat_demo/lighttpd.access.log”
server.errorlog =
“/var/log/lighttpd/domain1.com/chat_demo/lighttpd.error.log”
server.error-handler-404 = “/dispatch.fcgi”
server.indexfiles = ( “dispatch.fcgi”, “index.html” )
fastcgi.server = ( “/chat_demo/public/dispatch.fcgi” =>
( “localhost” =>
( “min-procs” => 1,
“max-procs” => 1,
“socket” =>
“/home/lighttpd/domain1.com/http/chat_demo/tmp/sockets/fcgi.socket”,
“bin-path” =>
“/home/lighttpd/domain1.com/http/chat_demo/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “development” ),
)))
}
}

$HTTP[“host”] =~ “(^|.)domain2.com$” {
server.document-root =
“/home/lighttpd/domain2.com/http/gullery-0.0.1/public”
server.error-handler-404 = “dispatch.fcgi”
#server.indexfiles = (“dispatch.fcgi”)
accesslog.filename =
“/var/log/lighttpd/domain2.com/lighttpd.access.log”
server.errorlog = “/var/log/lighttpd/domain2.com/lighttpd.error.log”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
( “min-procs” => 1,
“max-procs” => 1,
“socket” => “/tmp/fcgi.socket”,
“bin-path” =>
“/home/lighttpd/domain2.com/http/gullery-0.0.1/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “development” )
)))
}

Thanks in advance!

Bing

This was on my lighttpd.error.log

2006-08-24 19:33:32: (connections.c.1394) Warning: Either the
error-handler returned status 404 or the error-handler itself was not
found: /dispatch.fcgi
2006-08-24 19:33:32: (connections.c.1396) returning the original status
404
2006-08-24 19:33:32: (connections.c.1398) If this is a rails app: check
your production.log

well I checked my production.log (well my development.log for that
matter), it didn’t write anything. Well if it couldnt find the
dispatch.fcgi, obviously it would not have reached my rails app log yet
bec it didn’t understand on how to handle the request. I am sure that in
my rails app/public (gullery-0.0.1/public), dispatch.fcgi does indeed
exist.