LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   trac over fastcgi and apache (https://www.linuxquestions.org/questions/linux-server-73/trac-over-fastcgi-and-apache-4175472022/)

bluethundr 08-03-2013 07:07 PM

trac over fastcgi and apache
 
Hello,

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:

Code:

*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:

Code:

[Fri Aug 02 16:36:00 2013] [notice] Apache/2.2.21 (Unix) DAV/2 SVN/1.6.11
PHP/5.

3.17 mod_python/3.2.8 Python/2.4.3 configured -- resuming normal operations

[Fri Aug 02 16:36:07 2013] [error] (13)Permission denied: mod_fcgid:
couldn't bi

nd unix domain socket /etc/httpd/logs/fcgidsock/11690.0

[Fri Aug 02 16:36:07 2013] [warn] (13)Permission denied: mod_fcgid: spawn
proces

s /var/www/cgi-bin/trac.fcgi error

[Fri Aug 02 16:36:08 2013] [error] (13)Permission denied: mod_fcgid:
couldn't bi

nd unix domain socket /etc/httpd/logs/fcgidsock/11690.1

[Fri Aug 02 16:36:08 2013] [warn] (13)Permission denied: mod_fcgid: spawn
proces

s /var/www/cgi-bin/trac.fcgi error

[Fri Aug 02 16:36:09 2013] [error] (13)Permission denied: mod_fcgid:
couldn't bi

nd unix domain socket /etc/httpd/logs/fcgidsock/11690.2

[Fri Aug 02 16:36:09 2013] [warn] (13)Permission denied: mod_fcgid: spawn
process /var/www/cgi-bin/trac.fcgi error

[Fri Aug 02 16:36:10 2013] [error] (13)Permission denied: mod_fcgid:
couldn't bind unix domain socket /etc/httpd/logs/fcgidsock/11690.3

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

Code:

[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:

Code:

[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


Code:

<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>

I'd appreciate any advice you may have! Thank you in advance.

bathory 08-06-2013 02:10 AM

Since you're running apache on centos, I guess it's SELinux that is not allowing creating the socket under /etc/httpd/logs/fcgidsock


All times are GMT -5. The time now is 04:08 PM.