trac over apache using fcgid

T

Tim Dunphy

Guest
I'm attempting to use mod_fcgid to serve the trac web interface through
apache. I've already been able to verify that it works using tracd on
another port than my normal web server.

But when I added the fcgid config to my apache vhost for trac, I see the
following error in my web browser:

###
*Service Temporarily Unavailable*

The server is temporarily unable to service your request due to maintenance
downtime or capacity problems. Please try again later.


*Apache/2.2.21 (CentOS) Server at trac.mysite**.com Port 80*

*
*

###

And in the error logs I see the following:


###

[root@cloud:/etc/httpd/logs] #tail -f /var/log/httpd/trac-error.log
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n result = object(req)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 87, in handler\n gateway.run(dispatch_request)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib/python2.4/site-packages/trac/web/wsgi.py", line 87, in run\n response = application(self.environ, self._start_response)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 363, in dispatch_request\n env_paths)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 486, in send_project_index\n req.display(template)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 358, in display\n data = self.hdf.render(template, form_token)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: File "/usr/lib/python2.4/site-packages/trac/web/clearsilver.py", line 290, in render\n template.parseFile(filename)
[Sun Aug 04 12:06:19 2013] [error] [client 67.86.246.234] PythonHandler trac.web.modpython_frontend: Error: Traceback (innermost last):\n File "csparse.c", line 422, in cs_parse_file()\n File "neo_hdf.c", line 1818, in hdf_search_path()\nNotFoundError: Path index.cs not found\n
###


These are the ownership and permissions I have for the trac.fcgi script:

###
[root [at] clou:~] #ls -l /var/www/cgi-bin/trac.fcgi

-rwxr-xr-x 1 apache apache 1027 May 28 2010 /var/www/cgi-bin/trac.fcgi
###


And this is the directory that the logs are complaining that they cannot
write to:

###
[root [at] clou:~] #ls -ld /etc/httpd/logs/fcgidsock

drwx------ 2 apache apache 4096 Aug 2 16:18 /etc/httpd/logs/fcgidsock
###


And here is my apache vhost config


###
<VirtualHost *:80>


ServerName trac.mysite.com


# This is the Apache server configuration file for providing FastCGI
support

# through mod_fcgid

#

# Documentation is available at http://fastcgi.coremail.cn/doc.htm


LoadModule fcgid_module modules/mod_fcgid.so


# Use FastCGI to process .fcg .fcgi & .fpl scripts

# Don't do this if mod_fastcgi is present, as it will try to do the same
thing

<IfModule !mod_fastcgi.c>

AddHandler fcgid-script fcg fcgi fpl

</IfModule>


# Sane place to put sockets and shared memory file

SocketPath /var/run/mod_fcgid

SharememPath /var/run/mod_fcgid/fcgid_shm



## trac

Alias /trac/ "/usr/local/svn/repos/jf-trac"

ScriptAlias /trac /var/www/cgi-bin/trac.fcgi/

DefaultInitEnv TRAC_ENV /usr/local/svn/repos/jf-trac


<Directory "/usr/local/svn/repos">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all


# mod_python speeds things up considerably

SetHandler mod_python

PythonHandler trac.web.modpython_frontend

PythonOption TracEnvParentDir "/usr/local/svn/repos"

PythonOption TracUriRoot "/trac"


# authentication

# AuthType Digest

# AuthName "wiki-server"

# AuthDigestDomain /trac

# AuthUserFile "/etc/httpd/conf/digestpw"

# Require valid-user

# authorization is handled internally by trac

</Directory>


### subversion

<Location "/svn">

DAV svn

SVNListParentPath on

SVNParentPath /usr/local/svn/repos


Order allow,deny

Allow from all


# authentication

# AuthType Digest

# AuthName "wiki-server"

# AuthDigestDomain /svn

# AuthUserFile "/etc/httpd/conf/digestpw"

# Require valid-user


# authorization

# AuthzSVNAccessFile "/etc/httpd/conf/svn-auth.ini"

</Location>

</VirtualHost>
######

This is Trac 1.0.1 installed via source.

Thanks in advance
 

Members online


Top