Domanda

I've been pulling my hair out over this one, so hopefully someone can shed some light on this. I've been trying to install Trac 1.0 on a CentOS 6.3 server using Apache and mod_fcgid.

When I point my browser to the virtual host that's supposed to run Trac I get an Internal Server Error (500) and a log entry like this:

(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server Premature end of script headers: trac.fcgi

I created the trac environment in /var/trac/projectname

I then used trac-admin deploy to deploy the cgi-bin and htdocs for the project to my webroot for the virtual host. In the vhost.conf I added the following:

ScriptAlias / /home/httpd/vhosts/xxxx/sites/xxxx/cgi-bin/trac.fcgi/
DefaultInitEnv TRAC_ENV /var/trac/
ErrorLog "/var/log/httpd/xxxxx/error_log"
CustomLog "/var/log/httpd/xxxxx/access_log" common
LogLevel debug

<Directory "/home/httpd/vhosts/xxxxx/sites/xxxxx/htdocs">
  Order allow,deny
  Allow from all
</Directory>

<Directory "/home/httpd/vhosts/xxxxx/sites/xxxxx/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
</Directory>

Note I put xxxx to anonymize some domainname info.

Any ideas as to what could go wrong here? Or how I could debug this more to get more useful log info? I already set the logging to debug in trac.ini, but it doesn't log anything.

È stato utile?

Soluzione 2

So after finding that adding the environment path to the trac.fcgi executable itself I checked the rightmask of trac.fcgi. I noticed it didn't have any executable rights, so I gave the owner executable rights (744). After that it works, be it super slow and I don't see the trac logo in the upper left corner. This probably has something to do with the resource aliases in the vhost conf, so I'll look into that now.

What I do find awkward, and which makes me doubt if the file is supposed to be executable, is that there's no mention of this in the official installation wiki.

Edit: moved the Alias lines for the static resources in my vhost.conf above the ScriptAlias line. After that the static resources are loaded successfully and Trac is much faster. Looks like everything's working now. Awesome. :)

Altri suggerimenti

Related documentation in the authoritative wiki at trac.edgewall.org doesn't yield immediate hints, where your configuration could be wrong.

But your Error:104 suggests a problem with the fcgi executable itself anyway. Maybe you even want to try the approach with path to Trac environment embedded into trac.fcgi script itself as recommended in the example linked from the aforementioned wiki page.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top