Skip to content

Instantly share code, notes, and snippets.

@jpic
Created May 1, 2010 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpic/386663 to your computer and use it in GitHub Desktop.
Save jpic/386663 to your computer and use it in GitHub Desktop.
package main
import (
"http"
"http/fcgi"
"log"
)
func main() {
handler, err := fcgi.Handler([]fcgi.Dialer{
fcgi.NewDialer("tcp", "localhost:9002"),
})
http.Handle("/", handler)
if err != nil {
log.Exit("fcgi.Handler:", err)
return
}
err = http.ListenAndServe("localhost:8000", nil)
if err != nil {
log.Exit("ListenAndServe:", err)
return
}
}
@jldailey
Copy link

jldailey commented May 3, 2010

Try setting fcgi.Log to see more detail about what it's doing.

You can either set fcgi.Log to a function which write's its output, or you can go to the top of fcgi.go and set Log = doLog and rebuild (better to do it in your own code so you dont have to rebuild everything).

In the other gist you sent, one could see from the stack trace that the handler was connected to the fcgi responder, but without a stack trace or a log on this one, I can't tell much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment