I'm trying to setup a lighttpd server that will run fastCGI programs written in haskell. So far i got this haskell program:
import Network.CGI
import Text.XHtml
page :: Html
page = body << h1 << "Hello World!"
cgiMain :: CGI CGIResult
cgiMain = output $ renderHtml page
main :: IO ()
main = runCGI $ handleErrors cgiMain
and this lighttpd configuration:
server.document-root = "/home/userwww/www/"
server.port = 80
server.username = "userwww"
server.groupname = "userwww"
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
static-file.exclude-extensions = (".php", ".rb", "~", ".inc" )
index-file.names = ( "index.html" )
server.event-handler = "poll"
server.modules = (
"mod_access",
"mod_accesslog",
"mod_fastcgi",
"mod_rewrite",
"mod_cgi",
"mod_auth"
)
fastcgi.server = ("/test" =>
("test" =>
("socket" => "/tmp/test.sock",
"bin-path" => "/home/userwww/www/test.fcgi",
"check-local" => "disable"
)
)
)
Lighttpd starts nicely and works when I open index.html but when I try opening http://127.0.0.1/test it just starts loading the web page and continues loading it indefinitely without showing anything.
I suspect my lighttpd.conf file is either wrong or incomplete but after looking at the documentation I can't find whats wrong with it.