Premature end of script headers: dispatch.fcgi

Hey people,

I'm working on this issue for more than 4 hours now and I have no idea what's wrong so I ask you kindly to have a look at my stuff.

When I try to access my website I get this error: Application error Rails application failed to start properly

error.log says: [Wed Jul 23 17:51:22 2008] [error] Premature end of script headers: dispatch.fcgi

I tried to run ./dispatch.fcgi ("sudo -u vu2025..." which is the owner of all files to make sure the user does have the rights) and it worked! I tried to access it via browser with Webrick and it also worked so the Rails application itself is definitely working.

.htaccess: AddHandler fcgid-script .fcgi Options +FollowSymLinks +ExecCGI RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

fcgid.conf: <IfModule mod_fcgid.c>   SocketPath /var/lib/apache2/fcgid/sock   IdleTimeout 3600   ProcessLifeTime 7200   MaxProcessCount 8   DefaultMinClassProcessCount 3   DefaultMaxClassProcessCount 2   IPCConnectTimeout 8   IPCCommTimeout 60 </IfModule>

apache.conf: <VirtualHost>     SuexecUserGroup vu2025 vu2025     ...     DocumentRoot /var/www/virtual/MY_APPLICATION/new/htdocs/public     ...     ScriptAlias /cgi-bin/ /var/www/virtual/MY_APPLICATION/new/cgi-bin/     <Directory /var/www/virtual/MY_APPLICATION/new/cgi-bin>         AllowOverride None         #Options ExecCGI         Order allow,deny         Allow from all     </Directory>     ...     <Directory /var/www/virtual/MY_APPLICATION/new/htdocs>         Options Indexes Includes FollowSymLinks MultiViews ExecCGI         AllowOverride All         Order allow,deny         Allow from all     </Directory> </VirtualHost>

Any hints, ideas are appreciated!

nobody? :frowning:

Don't you need to add "public" to Directory? <Directory /var/www/virtual/MY_APPLICATION/new/htdocs/public> instead of <Directory /var/www/virtual/MY_APPLICATION/new/htdocs>

Just guessing...

Nope, doesn't help. Anyone else any idea? I'm stumped.

Have you tried fastcgi instead of fcgid?