I am relatively new to Nitro but have been lurking for a few months assessing if/when I wanted to jump in and give it a try. I have a new project that seems to be appropriate, so as a start I simply wanted to get it working on my laptop (3ghz P4 w/ WinXP.... yes I know, but WinXP is what I have to use for several reasons). I have noticed that Windows seems to be the stepchild for Nitro OSes (most of the main developers seem to use -nix or OsX).
So my first goal was to get the template app created by 'gen app' working.
I have Apache 1.3.33 and Mysql 4.1.19 (although the 'gen app' template does not require a DB, that is what I will be using as I progress). So here are the 10 steps I discovered to get the Nitro 'gen app' working under CGI.
gen app nitrotest
127.0.0.1 nitrotest.local
<VirtualHost *>
ServerName nitrotest.local
DocumentRoot <nitro-app-path>/nitrotest/public
<Directory <nitro-app-path>/nitrotest/public>
AllowOverride All
Options +FollowSymLinks +ExecCGI
Order allow,deny
allow from all
</Directory>
</VirtualHost>
# Redirect all requests not available on the filesystem
# to Nitro. By default the cgi dispatcher is used which
# is very slow.
AddHandler cgi-script .rb
Options +FollowSymLinks +ExecCGI
RewriteEngine On
# Set Rewrite conditions to let Apache deliver content in the
# js and media directories instead of sending to Nitro
RewriteCond %{REQUEST_URI} ^/js/.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/media/.*
RewriteRule .* - [L]
# Send .html files in the DocRoot via Apache if they exist
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# Route all other requests to Nitro thru cgi.rb
RewriteRule ^(.*)$ cgi.rb [QSA,L]
# In case Nitro experiences terminal errors.
ErrorDocument 500 "<h2>Application error</h2>Nitro failed to start properly"
#!c:/ruby/bin/ruby -rubygems
So I lied and did it in only 9 steps ;>)
It may not be fast since it is CGI and every Nitro request has to load and compile a complete Nitro run, but it gets you there as a first step.
My next goal is to see if I can get either SCGI or FastCGI to work. Will post a howto for that if I get it working.
Dave