# Scgi+lighttpd+windows - why wont it work?

**URL:** <https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485>\
**Category:** Rails\
**Created:** [February 28, 2006, 3:56am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485 "2006-02-28T03:56:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 3:56am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/1 "2006-02-28T03:56:01Z")

</div>

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  
[http://www.zedshaw.com/projects/scgi\_rails/](http://www.zedshaw.com/projects/scgi_rails/))  
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:

c:/ruby/lib/ruby/gems/1.8/gems/scgi\_rails-0.4.3/lib/scgi.rb:393:in  
`trap': unsupported signal SIGHUP (ArgumentError) from c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:393:in `run’  
from  
c:/ruby/lib/ruby/gems/1.8/gems/scgi\_rails-0.4.3/bin/scgi\_service:61

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

```

I also followed the lighttpd tute at  
[http://wiki.rubyonrails.org/rails/pages/HowToDeployWithLighttpdOnWindows](http://wiki.rubyonrails.org/rails/pages/HowToDeployWithLighttpdOnWindows)

and have my lighttpd.conf file as follows:

server.modules = (  
“mod\_rewrite”,  
“mod\_redirect”,  
“mod\_access”,  
“mod\_status”,  
“mod\_scgi”,  
“mod\_accesslog” )

server.document-root = “C:/rails/extranet/public”  
server.errorlog = “C:/rails/extranet/log/lighttpd.error.log”  
accesslog.filename =  
“C:/rails/extranet/log/lighttpd-access.log”  
static-file.exclude-extensions = ( “.php”, “.pl”, “.fcgi”, “.scgi” )  
server.error-handler-404 = “C:/rails/extranet/public/dispatch.scgi”  
scgi.server = (“dispatch.scgi” =\> ((  
“host” =\> “127.0.0.1”,  
“port” =\> “9999”,  
“check-local” =\> “disable”  
)) )  
scgi.debug=0  
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???

---

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 4:51am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/2 "2006-02-28T04:51:58Z")

</div>

Hi,  
What does your scgi.yaml look like?  
Cheers,  
Eric G.

---

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 5:01am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/3 "2006-02-28T05:01:38Z")

</div>

Hi Eric,

It looks like…

* * *

:password: HuNuSHNtQR58w  
:control\_url: druby://127.0.0.1:8999  
:port: 9999  
:config: config/scgi.yaml  
:logfile: log/scgi.log  
:env: production  
:host: 127.0.0.1

(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)

---

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 6:31am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/4 "2006-02-28T06:31:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 6:21am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/5 "2006-02-28T06:21:26Z")

</div>

Hey,

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:  
[http://blog.ericgoodwin.com/articles/2006/02/27/lighttpd-virtual-hosts-with-scgi-on-windows](http://blog.ericgoodwin.com/articles/2006/02/27/lighttpd-virtual-hosts-with-scgi-on-windows)

Cheers,  
Eric G.

---

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 6:51am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/6 "2006-02-28T06:51:25Z")

</div>

No Prob.  
Glad I could help out.

---

<div class="post-metadata">

**Author:** ![robbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@robbie](https://www.ruby-forum.com/u/robbie)\
**Post date:** [February 28, 2006, 6:27am UTC](https://www.ruby-forum.com/t/scgi-lighttpd-windows-why-wont-it-work/74485/7 "2006-02-28T06:27:33Z")

</div>

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