[typo] Problem setting up apache2/mod_fcgid/typo

Jim Cheetham jim at gonzul.net
Sun Feb 19 05:51:46 EST 2006


Hi, I'm having problems getting typo (svn checkout rev 865) working with
apache2 (using mod_fcgid, under debian stable) - the only output I get
is the error handler from .htaccess: "<h2>Application error</h2>Typo
filed to start properly".

Fundamentally I *think* I have apache2+mod-fcgid and rails working,
because a basic sample rails app works - dispatch.fcgi starts up and
returns data happily.

And there's nothing broken in typo under WEBrick, so I hope to be able
to discount the database connection, and hopefully the environment too.
(lighttpd doesn't work for either typo or the other rails app, so I'll
presume I've broken it in some independant way, and ignore it for now)

The apache error log tells me that "Premature end of script headers:
dispatch.fcgi"; and interestingly I get no fastcgi.log or
development.log from rails (yes, log/ is writeable).

I added a small debug output (to a /tmp/file) in the top of
dispatch.fcgi - this does *not* get created when I make a request under
apache. I thought I'd spotted an instance of dispatch.fcgi in the ps
listing once, but haven't been able to catch sight of it since.

So this looks like apache itself is having the problem, but the
virtualhost definition is the same for the typo site as for the sample
Rails app site ... 

Any assistance is welcome ;-) 

Here's the apache vhost declaration :-

<VirtualHost 192.168.10.158>
        ServerName      typo
        ServerAdmin     jim

        DocumentRoot    /var/www/docs/iNode/typo/public
        ErrorLog        /var/www/docs/iNode/typo/log/apache.error.log
        CustomLog       /var/www/docs/iNode/typo/log/apache.access.log combined
        LogLevel        warn

        <Directory      /var/www/docs/iNode/typo/public>
                Options ExecCGI +FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

And the .htaccess (comments stripped) :-

AddHandler fcgid-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 [QSA,L]
ErrorDocument 500 "<h2>Application error</h2>Typo failed to start properly"


More information about the Typo-list mailing list