I’m trying to run nitro under Apache2 with fcgid.
I’m almost there, the server is running, but I get 500 response, and my log only says:
Sun Mar 12 20:28:16 2006 [client 192.168.1.1] Premature end of script headers: fcgi.rb
With webrick it worked. So where to hunt for errors?
(1 attempts)
bsoto answered:
First, check to ensure the shebang line on fcgi.rb is correct. When switching between my Windows and Linux box, that always caught me. :)
If the path is okay, are you sure you configured httpd.conf correctly? You have to specify an intial environment. Of particular importance is setting up RUBYOPT if you installed nitro via gems or make use of any other gems. Also, Nitro makes use of mysqladmin, so you should specify the path to it.
FastCgiConfig -initial-env RUBYOPT="rubygems" / -initial-env PATH="/usr/bin"
You're getting fcgi.rb, so I assume you've already enabled mod_rewrite and have an .htaccess file...
You might try to su to apache and running fcgi.rb from the command line. Though you might need to be root to do that.