[Nitro] Nitro on Apache2 (Tutorial)

Michael Fellinger m.fellinger at gmail.com
Tue Oct 25 14:31:23 EDT 2005


Hi List,

I just tried to get nitro running on apache2, but since there is absolutly 
nothing except the apache.conf i am somewhat lost.
So i started a simple tutorial for doing that on the wiki, but i didn't get 
far...
to get some coverage over this topic, could someone please point out howto:
* install fcgi
* config apache2 (if possible - virtualhost)
* get nitro in there

is the apache.conf that is in the proto-directory for apache2? is it possible 
to put this config into a virtualhost?

getting some clearance into these topics would help a lot of people _very_ 
much.
btw - setting up apache seems to be a pain, comparing it to lighttpd, i got 
lighttpd configured in less then an hour :) - but the 0.23 has some issues 
with it (concerning fcgi and POST), is it possible to backport the 
fcgi-adapter from glycerin? (^^)

thanks in advance for your efforts, you can find my stub for the tutorial at
http://nitrohq.com/view/Tutorials:Nitro+on+Apache2

so long...
manveru

Am Mittwoch 12 Oktober 2005 21:03 schrieb Walter:
> Can anyone point me to any docs of using Nitro With Apache.
>
> I currently have an Apache server (Apache/2.0.52 running on Windows) that
> runs as a service and I use to execute other ruby based CGI scripts.
>
> I am trying to get Nitro working with this setup.
>
> I created a virtual host with some rewrite rules to always call cgi.cgi,
> which is jus cgi.rb renamed.
>
> <VirtualHost *>
>     ServerName nitro
>     DocumentRoot C:\dev\ruby\nitro\test1\public
>     <Directory C:\dev\ruby\nitro\test1\public>
>         Options ExecCGI FollowSymLinks
>         AllowOverride all
>         Allow from all
>         Order allow,deny
>
> 	RewriteEngine on
> 	RewriteBase   /nitro:8080/
> 	RewriteRule   !^.+\.cgi     -                  [C]
> 	RewriteRule   (.*)	/cgi.cgi/$1
>     </Directory>
>     ScriptAlias /cgi-bin/ "C:\dev\ruby\nitro\test1\test1\public\"
> </VirtualHost>
>
>
> My run.rb has mappings of
>
> App.map = { "/" => Test, "/legalListForDrivers" => LegalListForDrivers}
>
>
> If I type in http://nitro:8080/ I do get the index page of the
> TestController.  And if I type in http://nitro:8080/legalListForDrivers I
> do get the index page of the LegalListForDriversController.  The problem is
> if I enter data into the form fields and submit it, I seem to be getting
> errors reading in the data passed in.
>
> [Wed Oct 12 13:00:18 2005] [error] [client 127.0.0.1] Premature end of
> script headers: cgi.cgi, referer: http://nitro:8080/legalListForDrivers/
> [Wed Oct 12 13:00:18 2005] [error] [client 127.0.0.1]
> c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.23.0/lib/nitro/adapter/cgi.rb:227:in
> `parse_params': undefined method `binmode' for nil:NilClass
> (NoMethodError)\r, referer: http://nitro:8080/legalListForDrivers/ [Wed Oct
> 12 13:00:18 2005] [error] [client 127.0.0.1] \tfrom
> c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.23.0/lib/nitro/adapter/cgi.rb:32:in
> `start'\r, referer: http://nitro:8080/legalListForDrivers/ [Wed Oct 12
> 13:00:18 2005] [error] [client 127.0.0.1] \tfrom
> c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.23.0/lib/nitro/server/runner.rb:242:
>in `invoke'\r, referer: http://nitro:8080/legalListForDrivers/ [Wed Oct 12
> 13:00:18 2005] [error] [client 127.0.0.1] \tfrom
> c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.23.0/lib/nitro/server.rb:125:in
> `run'\r, referer: http://nitro:8080/legalListForDrivers/ [Wed Oct 12
> 13:00:18 2005] [error] [client 127.0.0.1] \tfrom
> C:/dev/ruby/nitro/test1/public/../run.rb:56\r, referer:
> http://nitro:8080/legalListForDrivers/ [Wed Oct 12 13:00:18 2005] [error]
> [client 127.0.0.1] \tfrom
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
> `require__'\r, referer: http://nitro:8080/legalListForDrivers/ [Wed Oct 12
> 13:00:18 2005] [error] [client 127.0.0.1] \tfrom
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
> `require'\r, referer: http://nitro:8080/legalListForDrivers/ [Wed Oct 12
> 13:00:18 2005] [error] [client 127.0.0.1] \tfrom
> C:/dev/ruby/nitro/test1/public/cgi.cgi:5\r, referer:
> http://nitro:8080/legalListForDrivers/
>
>
> Can anyone point me in the right direction.
>
> Any help would be greatly appreciated.
>
>
> Thanks,
>
>
> Walt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051025/7c1815ad/attachment.bin 


More information about the Nitro-general mailing list