Forum

503 - Service Unavailable

Chuong
10 December 2015, 11:05
Hi,

Can anyone help me fix this configuration file? It returns "503 - Service Unavailable"
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
}
Hugo Leisink
10 December 2015, 20:09
What kind of file is /home/notooth/Documents/Haskell/FastCGI/dist/build/FastCGI/FastCGI?
Chuong
11 December 2015, 03:53
FastCGI is a executable application that I compiled from this Haskell script:

    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
Hugo Leisink
12 December 2015, 01:48
Ok, that's not what you should use. The ConnectTo option expects a TCP port or a Unix socket file. Read the FastCGI chapter of this HOWTO page for more information.
This topic has been closed.