Typo on Lighttpd with FastCGI
Here is the partial config file for my lighttpd configuration. This is from /etc/lighttpd/lighttpd.conf on Debian. This for those who have full root access on the server, if you want to run it as a user change the port number to above 1024, make sure you have write access to all the directories, and change the server.username|groupname or look at this TypoOnFreebsd.
# lighttpd configuration file
#
# use a it as base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
server.modules = ( "mod_rewrite", "mod_redirect", "mod_access",
"mod_auth", "mod_fastcgi", "mod_proxy",
"mod_accesslog")
# Not really needed as we will be using the virtual hosts below.
server.document-root = "/home/user/typo/public/"
#######MIME's excluded for brevity
url.access-deny = ( "~", ".inc" )
server.port = 80
server.pid-file = "/var/run/lighttpd.pid"
$HTTPhost =~ "www\.domain\.org$" {
server.document-root = "/home/user/typo/public/"
server.errorlog = "/var/log/lighttpd-error.log"
accesslog.filename = "/var/log/lighttpd-access.log"
server.indexfiles = ( "/dispatch.fcgi" )
server.error-handler-404 = "dispatch.fcgi"
## Working FastCGI
fastcgi.server = (
".fcgi" =>
("typo" =>
(
"min-procs" => 1, # Does not work, always spawns 2
"max-procs" => 2,
"bin-environment" => ( "RAILS_ENV" => "production" ),
"socket" => "/tmp/rails-fastcgi.socket",
"bin-path" => "/home/user/typo/public/dispatch.fcgi",
"idle-timeout" => 120
)
)
)
}
server.username = "www-data"
server.groupname = "www-data"
(config from Debian stable with lighttpd built from source)
