Help with Debian package + FastCGI setup

Hello,

I’ve searched a read the wiki and tried so many combos that my eyes are
ready to pop. Hopefully someone will have a suggestion as to where I
have messed up setting up the debian packages to work with Apache2.

Background: Debian Sarge box running Apache 2. I was trying to run via
fast-cgi. When trying to install mod_perl my normally well behaved
apache2 server will not do anything (no error messages to the error log
even) when perl is enabled as a module. Currently trying with the 3.4
debs from http://www.jadevine.org.uk/request-tracker/ .

My current error log:
[Tue Mar 08 19:39:53 2005] [notice] FastCGI: process manager initialized
(pid 1335)
[Tue Mar 08 19:39:53 2005] [warn] FastCGI: server
"/usr/share/request-tracker3.4/libexec/mason_handler.fcgi" started (pid
1336)
[Tue Mar 08 19:39:55 2005] [notice] Apache/2.0.53 (Debian GNU/Linux)
mod_fastcgi/2.4.2 PHP/4.3.10-8 mod_ssl/2.0.53 OpenSSL/0.9.7e configured
– resuming normal operations
Can’t locate /etc/request-tracker3.4/RT_SiteConfig.pm in @INC (@INC
contains: /usr/local/share/request-tracker3.4/lib
/usr/share/request-tracker3.4/lib /etc/perl /usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at
/usr/share/request-tracker3.4/lib/RT.pm line 123.
BEGIN failed–compilation aborted at
/usr/share/request-tracker3.4/libexec/webmux.pl line 79.
Compilation failed in require at
/usr/share/request-tracker3.4/libexec/mason_handler.fcgi line 52.
[Tue Mar 08 19:39:58 2005] [warn] FastCGI: server
"/usr/share/request-tracker3.4/libexec/mason_handler.fcgi" (pid 1336)
terminated by calling exit with status ‘13’

[Tue Mar 08 19:54:57 2005] [error] [client 24.164.226.14] FastCGI:
invalid (dynamic) server
"/usr/share/request-tracker3.4/html/index.html": access for server (uid
33, gid 33) not allowed: execute not allowed

Apache config outside of the virtual host section:
AddHandler fastcgi-script fcgi
#FastCgiIpcDir /var/run/fastcgi
FastCgiServer /usr/share/request-tracker3.4/libexec/mason_handler.fcgi

ScriptAlias /rt /usr/share/request-tracker3.4/libexec/mason_handler.fcgi

<Location /rt/>
DirectoryIndex index.html

Apache config inside the virtual host section:

Adding the following for RT (the ticket tracker)

Alias /rt /usr/share/request-tracker3.4/html

<Location /rt>
RewriteEngine On
RedirectMatch permanent (.*)/$ $1/index.html
AddDefaultCharset UTF-8
SetHandler fastcgi-script

Anyone have any ideas where I might have gone wrong? I had to comment
out the FastCgiIpcDir /var/run/fastcgi line because otherwise I got an
error, “FastCgiIpcDir /var/run/fastcgi: already defined as
”/var/lib/apache2/fastcgi."

Thanks,
Sam

Hi,On 2005-03-08 21:07:00 -0600, Sam Snow wrote:

ready to pop. Hopefully someone will have a suggestion as to where I
have messed up setting up the debian packages to work with Apache2.

Can’t locate /etc/request-tracker3.4/RT_SiteConfig.pm in @INC (@INC
contains: /usr/local/share/request-tracker3.4/lib

Is /etc/request-tracker3.4/RT_SiteConfig.pm readable by the apache
process, i.e. 600 www-data:www-data?

Cheers,
MB

Michael Bussmann bus@mb-net.net
BOFH excuse #240:

Too many little pins on CPU confusing it, bend back and forth until 10-20% are neatly removed. Do not leave metal bits visible!

Michael Bussmann wrote:

Hi,

ready to pop. Hopefully someone will have a suggestion as to where I
have messed up setting up the debian packages to work with Apache2.

Can’t locate /etc/request-tracker3.4/RT_SiteConfig.pm in @INC (@INC
contains: /usr/local/share/request-tracker3.4/lib

Is /etc/request-tracker3.4/RT_SiteConfig.pm readable by the apache
process, i.e. 600 www-data:www-data?

Cheers,
MB

Thank you!

I had to do that permissions change along with install libcgi-fast-perl
which provided CGI/Fast.pm.

Now when I try to view the index page I get the following error, but at
least it was not the long string like before:

[Wed Mar 09 05:58:49 2005] [error] [client 24.164.226.14] FastCGI:
invalid (dynamic) server
"/usr/share/request-tracker3.4/html/index.html": access for server (uid
33, gid 33) not allowed: execute not allowed

Sam

Now when I try to view the index page I get the following error, but at
least it was not the long string like before:

[Wed Mar 09 05:58:49 2005] [error] [client 24.164.226.14] FastCGI:
invalid (dynamic) server
"/usr/share/request-tracker3.4/html/index.html": access for server (uid
33, gid 33) not allowed: execute not allowed

Looking at some of the apache config you posted previously:

ScriptAlias /rt /usr/share/request-tracker3.4/libexec/mason_handler.fcgi

<Location /rt/>
DirectoryIndex index.html

Apache config inside the virtual host section:

Adding the following for RT (the ticket tracker)

Alias /rt /usr/share/request-tracker3.4/html

<Location /rt>
RewriteEngine On
RedirectMatch permanent (.*)/$ $1/index.html
AddDefaultCharset UTF-8
SetHandler fastcgi-script

You should not need that “SetHandler fastcgi-script” line in the
Location, the “ScriptAlias” line should already be doing all the work
of directing the rt requests to the correct handler. I have it
configured with apache2 and fastcgi without that line and it all works
fine. Try removing it and see what happens.

Stephen

Stephen Quinney wrote:> On Wed, Mar 09, 2005 at 07:05:11AM -0600, Sam Snow wrote:

Now when I try to view the index page I get the following error, but at
least it was not the long string like before:

[Wed Mar 09 05:58:49 2005] [error] [client 24.164.226.14] FastCGI:
invalid (dynamic) server
"/usr/share/request-tracker3.4/html/index.html": access for server (uid
33, gid 33) not allowed: execute not allowed

Looking at some of the apache config you posted previously:

##########
ScriptAlias /rt /usr/share/request-tracker3.4/libexec/mason_handler.fcgi

<Location /rt/>
DirectoryIndex index.html

Apache config inside the virtual host section:

Adding the following for RT (the ticket tracker)

Alias /rt /usr/share/request-tracker3.4/html

<Location /rt>
RewriteEngine On
RedirectMatch permanent (.*)/$ $1/index.html
AddDefaultCharset UTF-8
SetHandler fastcgi-script

##########

You should not need that “SetHandler fastcgi-script” line in the
Location, the “ScriptAlias” line should already be doing all the work
of directing the rt requests to the correct handler. I have it
configured with apache2 and fastcgi without that line and it all works
fine. Try removing it and see what happens.

Stephen

Stephen,

You were correct. Having the “SetHandler” in there was resulting in
apache trying to execute each file in the /rt directory-- hence the
error message that I was getting. Thank you for the reply!

My working Debian Sarge + Apache2 + fastcgi + request-tracker
configuration finally came from the "How to Run Multiple RT Instances"
page and is as follows:

Inside the portion

AddHandler fastcgi-script fcgi

<Directory “/usr/share/request-tracker3.4/html”>
Options FollowSymLinks ExecCGI
AllowOverride None

The following two lines are outside the portion

(at the bottom)

FastCgiServer /usr/share/request-tracker3.4/libexec/mason_handler.fcgi
ScriptAlias /rt /usr/share/request-tracker3.4/libexec/mason_handler.fcgi

Thank you to everyone who responded. I’m sure I will have more
questions, but at least now I am able to start trying out the software.

Off to bed,
Sam