I was fighting this problem for a few days. I don''t really know what
solved
it but I did the following:
Reinstalled the FCGI gem.
Rebuilt .htaccess, dispatch.fcgi and dispatch.rb
It''s working now but who knows.
> From: Matthias Pronk <news-Z0PD+i5g2PZmR6Xm/wNWPw@public.gmane.org>
> Reply-To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> Date: Mon, 12 Dec 2005 15:51:03 +0100
> To: <rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org>
> Subject: [Rails] Ruby on Rails under Apache/FastCGI problems
>
> Hi!
>
> I''m trying to get Rails work with Apache/FastCGI, but it seems to
error
> on something I can''t trace. I have the Oracle database driver
(OCI8)
> installed, but I currently don''t use it (the database.yml is
configured
> to use MySQL). For some reason, I had to add the Oracle environment
> variables to get the Rails FastCGI server to boot. Everything works fine
> when I use Webrick (i.e. ./script/server).
>
> Any help is appreciated!
>
> TIA,
> - Matthias
>
>
>
> The error I get in my Apache error_log:
> --------------------------------------------------
> [Mon Dec 12 15:44:18 2005] [notice] Apache/2.0.52 (CentOS) configured --
> resuming normal operations
> [Mon Dec 12 15:44:18 2005] [warn] FastCGI: server
> "/srv/www/public/dispatch.fcgi" started (pid 16778)
> [Mon Dec 12 15:44:26 2005] [error] [client 127.0.0.1] FastCGI:
> incomplete headers (35 bytes) received from server
> "/srv/www/public/dispatch.fcgi"
> --------------------------------------------------
>
>
> The related part of the Apache configuration:
> --------------------------------------------------
> LoadModule fastcgi_module modules/mod_fastcgi.so
>
> <IfModule mod_fastcgi.c>
> FastCgiIpcDir /tmp/fcgi_ipc
> FastCgiServer /srv/www/public/dispatch.fcgi \
> -initial-env RAILS_ENV=development \
> -initial-env LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.1/client/lib \
> -initial-env ORACLE_HOME=/usr/lib/oracle/10.2.0.1/client \
> -processes 2 \
> -idle-timeout 60
> </IfModule>
>
> <Directory /srv/www/public>
> AddHandler fastcgi-script .fcgi
> AddHandler cgi-script .cgi
> Options +FollowSymLinks +ExecCGI
>
> RewriteEngine On
> RewriteRule ^$ index.html [QSA]
> RewriteRule ^([^.]+)$ $1.html [QSA]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ /dispatch.fcgi?$1 [QSA,L]
>
> ErrorDocument 500 /500.html
> ErrorDocument 404 /404.html
> </Directory>
> --------------------------------------------------
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails