I try to setup Trac on a shared server with shell access, SW is Trac 1.0.1, Python 2.6.6, Apache 2.2.15 with mod_fcgid and mod_suexec.
I've set it up following the instructions from the wiki of my hoster, https://uberspace.de/dokuwiki/cool:trac . The only difference is that my TRAC_ENV directory lives in a subdirectory, not directly in my home (i.e. ~/path/to/trac, not ~/trac). (And I renamed trac.fcgi to foo-trac.fcgi in the DocRoot, as follows. But I also tried with renaming back to trac.fcgi.)
As written there, I've copied trac.fcgi (and also tried with trac.cgi) from TRAC_ENV/deploy/cgi-bin/ to $DocRoot/foo/foo-trac.fcgi and added
Options +ExecCGI
AddHandler fcgid-script .fcgi # also tried "AddHandler cgi-script .cgi"
RewriteEngine On
RewriteBase /foo
RewriteRule ^$ foo-trac.fcgi [L] # also tried foo-trac.cgi
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) foo-trac.fcgi/$1 [QSA,L] # also tried foo-trac.cgi
to $DocRoot/foo/.htaccess.
TRAC_ENV is correctly set in foo-trac.f?cgi (with absolute path starting from /),
But for now, I only get "500 Internal Server Error", and in my error_log I get
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: foo-trac.fcgi
(with fcgi), respectively
suexec failure: could not open log file
fopen: Permission denied
Premature end of script headers: foo-trac.cgi
(with cgi).
All the .f?cgi files, their directories, the .egg_cache directory (I have mkdir'ed it, hasn't existed and wasn't made by trac (or python) itself) and also the log directories are mode 0755. Log files are 0644 (I've touch'ed them in a try).
(Well, Apache log dir and files are owned by (and group is also) root. But of course I don't try to write any logs by myself there, and TRAC_ENV/log/ and ~/log/ are mine, and I also tried to set mode 777 (dir) respectively 666 (trac.log) - doesn't help, so I reversed that modes again to 755/644.)
I have also already tried/checked the hints from http://encodable.com/internal_server_error/ and /suexec_problems/ there, but nothing works or helps.
Any hints where to search for the problem (seems it's suexec, but maybe it is the rewrite rules; but/and), how to discover it? Or maybe anyone directly has a solution? :)
Regards,
panne