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