Forum: Ruby on Rails Apache not running Fcgid

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Matthew F. (Guest)
on 2006-03-12 02:31
(Received via mailing list)
I'm having the same problems as this fellow, Mr. Cheetham, in getting
my rails app up and running on apache2+fcgid.  Webrick runs, but
dispatch.fcgi never actually runs, and apache spits out a grusome
"Premature end of script headers: dispatch.cgi" error message in the
log.  Mr. Cheetham describes his problem at

I can safely say dispatch.fcgi is not actually running because, like
mr. Cheetham, I modified my dispatch.fcgi to spit out some foo into
/tmp as soon as it is run.  Foo is not being spat.

Manually running dispatch.fcgi gives me a 500 error and spits out some
foo to /tmp.

Please assist, I've been going completely bonkers over this.  There's
nothing in rails_root/log, no useful info from apache..... I want my 8
hours back.   I want this working.  :/

Roland (Guest)
on 2006-03-12 02:54
In dispatch.fcgi the top line should have something like this:


In a terminal decide where ruby is located by:

which ruby

and put the path after the exlamation mark. This is it in terms of rails

You might need other libraries related to fcgi to make this run. What
distro/os do you run?
Matthew F. (Guest)
on 2006-03-12 03:08
(Received via mailing list)
I'm on RH/Fedora FC2.  I compiled ruby 1.8.4, mod_fcgid, a bunch of
other stuff from source.

I've been hitting wall after wall on this deploy, I imported an older
.htaccess that was still Rewriting to the .cgi, not the .fcgi.  Now
that its trying to run the .fcgi, I'm getting some output in the
apache logs, although dispatch.fcgi is still not running.  Here's my

[Sat Mar 11 20:16:07 2006] [debug] fcgid_proc_unix.c(487):
(111)Connection refused: mod_fcgid: can't connect unix domain socket:
[Sat Mar 11 20:16:07 2006] [debug] fcgid_proc_unix.c(487):
(111)Connection refused: mod_fcgid: can't connect unix domain socket:
[Sat Mar 11 20:16:07 2006] [info] mod_fcgid: can't apply process slot
for /home/httpd/vhosts/[host]/httpdocs/geo/dispatch.fcgi

/home/httpd/vhosts/[host]/httpdocs/geo is a softlink to /home/geodb

Again, manually running ./public/dispatch.fcgi gives me 500 error
message and actually runs dispatch.fcgi.  dispatch.fcgi doesnt seem to
be the problem, looks like it's mod_fcgid not actually starting rails

Matthew F. (Guest)
on 2006-03-12 03:08
(Received via mailing list)
Forgot to mention /home/geodb/config/fcgi directory is world writable,
and accessible.  Just another checkmark.  Thanks.
Anonymous (Guest)
on 2006-03-23 01:51
(Received via mailing list)
make sure that wherever in the apache config you are loading the module
you also have these fcgid IPCCommTimeout and IPCConnectTimeout options
set. example:

	LoadModule fcgid_module modules/
	AddHandler fcgid-script .fcg
	AddHandler fcgid-script .fcgi
	IPCCommTimeout 40
	IPCConnectTimeout 10
This topic is locked and can not be replied to.