Scgi+lighttpd+windows - why wont it work?


two problems, pls help…I’m under big pressure at work to fix this!

I’m having trouble getting scgi and lighttpd running on windows - here’s
what I did:

On Win XP, I installed ruby, rubygems, and setup my rails app. All works
fine with webrick.

I then did: gem install cmdparse and gem install highline (as required
for the scgi_rails gem according to
Then I downloaded scgi_rails-0.4.3.gem and installed it.
I then ran scgi_ctrl config -S and entered a password (is this pwd
supposed to map to the db or something??).

When I cmd to my rails app and type scgi_service, i get the following
nasty error:

trap': unsupported signal SIGHUP (ArgumentError) from c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:393:inrun’

    from c:/ruby/bin/scgi_service:18:in `load'
    from c:/ruby/bin/scgi_service:18

I also followed the lighttpd tute at

and have my lighttpd.conf file as follows:

server.modules = (
“mod_accesslog” )

server.document-root = “C:/rails/extranet/public”
server.errorlog = “C:/rails/extranet/log/lighttpd.error.log”
accesslog.filename =
static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.scgi” )
server.error-handler-404 = “C:/rails/extranet/public/dispatch.scgi”
scgi.server = (“dispatch.scgi” => ((
“host” => “”,
“port” => “9999”,
“check-local” => “disable”
)) )
status.status-url = “/server-status”
status.config-url = “/server-config”

and now lighttpd won’t start up or generate errors in the errorlog
either…why are these things always so damn difficult???


What does your scgi.yaml look like?
Eric G.


Hi Eric,

It looks like…

:password: HuNuSHNtQR58w
:control_url: druby://
:port: 9999
:config: config/scgi.yaml
:logfile: log/scgi.log
:env: production

(ps I upgraded to the latest 1.4.10a version of lighttpd, and it seems
ok, still having the error when I run scgi_service from within my rails
app folder)


you F&*cking beauty!!!

Thanks Eric, can’t believe I didn’t come across this fundamental
neccessity anywhere else in the gazillion other sites I went to.



You’re missing
:disable_signals: true
from your scgi.yaml since windows doesn’t have POSIX support.

If you want a example scgi.yaml file, check out this:

Eric G.


No Prob.
Glad I could help out.


Arg … sorry for the aweful grammer. I didn’t proof read the post
I sent it. Hope this helps you out though.
Eric G.