ServerId = www-data
ConnectionsTotal = 1000
ConnectionsPerIP = 25
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
Binding {
Port = 80
}
FastCGIserver {
FastCGIid = demo
ConnectTo = /home/notooth/Documents/Haskell/FastCGI/dist/build/FastCGI/FastCGI
}
Hostname = 127.0.0.1
WebsiteRoot = /var/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
VirtualHost {
Hostname = localhost
WebsiteRoot = /home/notooth/Documents/hiawatha/www
UseFastCGI = demo
}
module Main ( main ) where
import Control.Concurrent
import Network.FastCGI
action :: CGI CGIResult
action = do
setHeader "Content-type" "text/plain"
tid <- liftIO myThreadId
output $ unlines
[ "I am a FastCGI process!"
, "Hear me roar!"
, ""
, show tid
]
main :: IO ()
main = runFastCGIConcurrent' forkIO 10 action