[Nitro] Nitro Apache2 CGI/FCGI (again)

Erik Howard erik at kommunicate.net
Thu Dec 29 14:01:03 EST 2005


Kashia Buch wrote:

>Hi,
>
>trying to get nitro to run on apache. (lets hope I can successfully reply  
>to myself again in a few minutes ;))
>
>error:
>
>DEBUG -- : Using memory sessions.
>[error] [client 127.0.0.1] malformed header from script. Bad header=nil:  
>fcgi.rb
>INFO -- : Og uses the Psql store.
>
>and a error 500 to the browser ("Nitro failed to start properly")
>
>setup is following:
>
>httpd.conf
>-------------------
><VirtualHost *:80>
>   ServerName nitro
>   DocumentRoot /path/to/app/public/
>   ErrorLog /path/to/app/log/apache.log
>   ErrorDocument 500 "<h2>Application error</h2>Nitro failed to start  
>properly"
>
>   Options +FollowSymLinks +ExecCGI
>
>   <Directory /pat/to/app/public/>
>     Options ExecCGI FollowSymLinks
>     AllowOverride all
>     Allow from all
>     Order allow,deny
>   </Directory>
></VirtualHost>
>
>and in /path/to/app/public/.htaccess
>-------------------
>RewriteEngine On
>RewriteRule ^$ index.html [QSA]
>RewriteRule ^([^.]+)$ $1.html [QSA]
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteRule ^(.*)$ cgi.rb [QSA,L]
>
>
>well, I seem to be missing something important, is that .htaccess approach  
>even possible?
>
>Kash
>  
>

Take a look at the last line of your rewrite rules.

RewriteRule ^(.*)$ *cgi.rb* [QSA,L]

should be

RewriteRule ^(.*)$ *fcgi.rb* [QSA,L]

Also make sure fcgi.rb is executable by the Apache user. I have Nitro 
running on Apache2/FCGI with no problems. Hope this helps.

-Erik



More information about the Nitro-general mailing list