[CentOS] Lighttpd setup with rails

Mon Dec 11 18:27:42 UTC 2006
Scott Parks <scottaparks at gmail.com>

Hi Everyone-

I am trying to setup lighttpd on a CentOS 4.2 box after having  
problems with getting it to work on Apache.  I am hoping some fresh  
eyes can see any errors below.  The log files are useless as they  
just say server stop and server start.  When I create an app in rails  
I can see the rails welcome screen, but everything else comes up 404.

Here is my lighttpd config pointing to the folder /home/rails/test <-  
where I created the rails app.

Thank you!

-Scott

server.modules              = (
                                "mod_rewrite",
				"mod_redirect",	
                                 "mod_access",
                                 "mod_fastcgi",
                                 "mod_accesslog" )

server.document-root        = "/home/rails/test/public/"
server.errorlog             = "/var/log/lighttpd.error.log"
index-file.names            = ( "index.html",
                                 "index.htm", "default.htm" )
server.error-handler-404 = "/dispatch.fcgi"
	#rails stuff
	######fastcgi module
fastcgi.server = (
     ".fcgi" => (
	"test" => (
         "socket" => "/tmp/test1.socket",
         "bin-path" => "/home/rails/test/public/dispatch.fcgi",
	"bin-environment" => ( "RAILS_ENV" => "production" ),	
         "min-procs" => 1,
         "max_procs" => 2
       )
   )
)
#### accesslog module
accesslog.filename          = "/var/log/lighttpd_access.log"

url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
   server.range-requests = "disable"
}

##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

## bind to port (default: 80)
server.port                = 8080