Mason problem?

I’m running rt-3.0.11, apache-2.0.49, and mod_perl-1.99_11.

Apache doesn’t seem to be obeying the DirectoryIndex directives. If I
navigate to http://helpdesk.foo.com/, I get a 404, but if I navigate
to http://helpdesk.foo.com/index.html, I get the correct rt login
page.

I have verified that index.html is listed in the DirectoryIndex
Directive, so I’m thinking that the mason handler or something else is
screwing up the request.

I get this in my apache error_log when I make a request to / :

[Thu Jun 24 12:40:42 2004] [error] [client 192.168.1.95] Attempt to
serve directory: /opt/rt3/share/html/

Any ideas?

Thanks!

Erik Anderson wrote:

I’m running rt-3.0.11, apache-2.0.49, and mod_perl-1.99_11.

Apache doesn’t seem to be obeying the DirectoryIndex directives. If I
navigate to http://helpdesk.foo.com/, I get a 404, but if I navigate
to http://helpdesk.foo.com/index.html, I get the correct rt login
page.

I have verified that index.html is listed in the DirectoryIndex
Directive, so I’m thinking that the mason handler or something else is
screwing up the request.

I get this in my apache error_log when I make a request to / :

[Thu Jun 24 12:40:42 2004] [error] [client 192.168.1.95] Attempt to
serve directory: /opt/rt3/share/html/

Any ideas?

Can you send your httpd.conf? Seems like an Alias problem or so.

The relevant part of the RT config file would also be helpful.

Jan

Thanks!


The rt-users Archives

RT Developer and Administrator training is coming to LA, DC and Frankfurt this spring and summer.
http://bestpractical.com/services/training.html

Sign up early, as class space is limited.

Jan Algermissen http://www.topicmapping.com
Consultant & Programmer http://www.gooseworks.org

I’m running rt-3.0.11, apache-2.0.49, and mod_perl-1.99_11.

Apache doesn’t seem to be obeying the DirectoryIndex directives. If I
navigate to http://helpdesk.foo.com/, I get a 404, but if I navigate
to http://helpdesk.foo.com/index.html, I get the correct rt login
page.

I have verified that index.html is listed in the DirectoryIndex
Directive, so I’m thinking that the mason handler or something else is
screwing up the request.

I get this in my apache error_log when I make a request to / :

[Thu Jun 24 12:40:42 2004] [error] [client 192.168.1.95] Attempt to
serve directory: /opt/rt3/share/html/

There is a problematic interaction between the modperl2 handler system
and the Apache2 module that takes a request for a directory and serves
up the index page, if it exists.

There are various solutions that use apache config options for
mod_rewrite. One is suggested in the README that comes with rt3:

RewriteEngine On
RewriteRule ^(.*)/$ $1/index.html

I am not certain this is exactly the correct thing to do. I came up
with something like this for the suggested Apache2/modperl2 config in
the Debian package:

####### begin #######
AddDefaultCharset UTF-8

PerlModule Apache2 Apache::compat
PerlModule Apache::DBI
PerlRequire /usr/share/request-tracker3/libexec/webmux.pl
PerlSetVar MasonArgsMethod CGI

RewriteEngine on

This assumes your site has a base absolute url of /rt

e.g. http://www.example.com/rt

Ensure we always have a trailing slash after the rt base

RewriteRule ^/rt$ /rt/

Rewrite urls to physical locations

RewriteRule ^/rt/(.*)$ /usr/share/request-tracker3/html/$1

Directory requests need an index.html appended

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(/usr/share/request-tracker3/html.*)/$ $1/index.html

<Directory /usr/share/request-tracker3/html>
SetHandler perl-script
PerlHandler RT::Mason

####### end #######

I have tested this with various situations and it seems to work
well. Obviously it would need a fair bit of alteration if you were
using a Location directive or had the base physical location as your
DocumentRoot. I think this gives the basic idea of how to do the
rewriting though.

Stephen Quinney

signature.asc (189 Bytes)

I’m running rt-3.0.11, apache-2.0.49, and mod_perl-1.99_11.

Apache doesn’t seem to be obeying the DirectoryIndex directives. If I
navigate to http://helpdesk.foo.com/, I get a 404, but if I navigate
to http://helpdesk.foo.com/index.html, I get the correct rt login
page.

I was having the same problem, then something I did suddenly cured the
problem… I’m not sure exactly what solved it. I’m using Debian GNU/
Linux unstable, and Apache 2 with mod_perl2. I’ve enabled mod_ssl,
mod_perl2, and mod_rewrite, and have added a listen 443 to ports.conf.
I’ve also added a global configuration in apache2/conf.d for the SSL
server certificate…

The attached file is the RT virtual host on my laptop testbed. Perhaps
others will find it useful.

Karl Hegbloom hegbloom@pdx.edu

rt (3.89 KB)

Thanks for the info, Karl…I actually got it working last night by
adding in the mod_rewrite rule for apache2. I don’t know how I missed
that the first time around. I’ll chock it up to it being the end of
a long week ;-)On Fri, 25 Jun 2004 08:40:46 -0700, Karl Hegbloom hegbloom@pdx.edu wrote:

On Fri, 2004-06-25 at 13:29 +0100, Stephen Quinney wrote:

On Thu, Jun 24, 2004 at 12:41:28PM -0500, Erik Anderson wrote:

I’m running rt-3.0.11, apache-2.0.49, and mod_perl-1.99_11.

Apache doesn’t seem to be obeying the DirectoryIndex directives. If I
navigate to http://helpdesk.foo.com/, I get a 404, but if I navigate
to http://helpdesk.foo.com/index.html, I get the correct rt login
page.

I was having the same problem, then something I did suddenly cured the
problem… I’m not sure exactly what solved it. I’m using Debian GNU/
Linux unstable, and Apache 2 with mod_perl2. I’ve enabled mod_ssl,
mod_perl2, and mod_rewrite, and have added a listen 443 to ports.conf.
I’ve also added a global configuration in apache2/conf.d for the SSL
server certificate…

The attached file is the RT virtual host on my laptop testbed. Perhaps
others will find it useful.


Karl Hegbloom hegbloom@pdx.edu

rt - 3K Download
noname - 1K Download