You may have noticed, and I’ve already reported about this in another article, that installing fcgi on Windows is impossible. Even running Lighttpd isn’t quite easy, especially for newcomers. So this is why I’m writing this step-by-step guide, to make your life easier (at least I hope so - if you don’t like it, send me an email or design an anti-step-by-step-guide-button). Another note: I won’t cover the topic ‘How to install Ruby on Windows’ here. There’s a good entry about that on the Ruby on Rails Wiki. You basically only have to get the Ruby one-click installer and install RubyGems, a package manager.
1. Lighttpd for Windows
Lighttpd is actually designed for Linux and Darwin so it’s a bit hard to compile it on your own, especially if you don’t have cygwin installed. Generously there’s a person like Kevin Worthington who has a on category on his blog where you can inform yourself of the latest compiled versions of Lighttpd for Windows (at the moment that’s 1.4.10a). One note: Lighttpd for Windows is sometimes still buggy so I wouldn’t recommend it for production but it’s really fine for testing and development.
Installing it should be really no problem.
2. SCGI Ruby on Rails Runner
Thus FastCGI won’t work with Lighttpd under Windows, we need an alternative: SCGI, which is at least as fast as FastCGI and a lot easier to install. You first have to download the gem package and install it with RubyGems:
[code lang="bash"]gem install scgi_rails-0.4.3.gem[/code]
3. Configuring Lighttpd
You now have to change your settings for Lighttpd. These are written down in lighttpd.conf, which should be in a folder called ‘etc’ in your Lighttpd installation folder. Make a copy of it and alter the file like that:
[code lang="bash"] server.modules = ( “modrewrite”, “modredirect”, “modaccess”, “modaccesslog”, “modstatus”, “modscgi”)
server.document-root = “
Note the line which says ’scgi.debug = 3′. That means that your scgi-server will log a lot of debugging-information. Change this to 0 if you want to run in deployment mode (which you shouldn’t do on Windows anyway).
4. Configuring SCGI
Open a command window, change to your ruby application directory and type: [code lang="bash"]scgictrl config[/code] It will ask you for your password. Write it down and don’t tell anybody. The command will generate a scgi.yaml file in your config directory where you can edit the mode of your scgi server (production | development) and some other stuff. scgictrl has some other nice abilities, like monitoring your application (just add ‘monitor’ after the scgi_ctrl command), which you can read about in the SCGI Ruby Runner Howtos
5. Starting the servers
Now the only thing we have to is starting our servers. That’s Lighttpd and SCGI:
[code lang="bash"]
lighttpd.exe -f
If you have any questions, just write me an email or post a comment (and don’t be afraid of telling me your opinion, I don’t bite, usually)



I’ve seen quite a few presentations at college by some people who, at least it looked like they would, earn plenty of money. Some of those presentations were quite interesting and well done, some were, gently speaking, just useless. Overloaded, ininformative and plainly ugly. But they all had one thing in common: they were old style, discreet colors with no sense of humor.
Key Sentences