Problems under Apache2

Have some strange issues with RT3 under Apache2 with mod_perl2

Running RT as a directory not a virtual host config below:

AddDefaultCharset UTF-8

PerlSetVar MasonArgsMethod CGI
PerlModule Apache2 Apache::compat
RewriteEngine On
RewriteRule ^(.*)/$ $1/index.html

PerlModule Apache::DBI
PerlRequire /home/rt/bin/webmux.pl

Alias /helpdesk “/home/rt/share/html”
<Directory “/home/rt/share/html”>
AllowOverride none
Options Indexes
Order allow,deny
Allow from all

<Location “/helpdesk”>
SetHandler perl-script
PerlHandler RT::Mason

Now RT works no issues but to get it to work I have to enter the entire URL

Ie: http://www.bit.net.au/helpdesk/index.html

In fact if I enter just http://www.bit.net.au/helpdesk I see a directory
listing and index.html is there.

Strange.

I have been working on this a while and its probably the most obvious thing
but I cant see it. The rest of the machine works 100% fine.

Regards
BIT.net Pty. Ltd
James Austin
CEO

m: 0410 59 0000
e: jea@bit.net.au
w: www.bit.net.au

smime.p7s (4.23 KB)

Hi, on first look it seems that you need add to httpd.conf
DirectoryIndex index.html its default name of index file,
which apache is looking for.
hope it help

Its already enabled in the global configuration for main and all servers. In
fact index.html works everywhere but under /helpdesk

Regards
james

smime.p7s (4.23 KB)

James Austin wrote:

Have some strange issues with RT3 under Apache2 with mod_perl2

Running RT as a directory not a virtual host config below:

AddDefaultCharset UTF-8

PerlSetVar MasonArgsMethod CGI
PerlModule Apache2 Apache::compat
RewriteEngine On
RewriteRule ^(.*)/$ $1/index.html

PerlModule Apache::DBI
PerlRequire /home/rt/bin/webmux.pl

Alias /helpdesk “/home/rt/share/html”
<Directory “/home/rt/share/html”>
AllowOverride none
Options Indexes
Order allow,deny
Allow from all

<Location “/helpdesk”>
SetHandler perl-script
PerlHandler RT::Mason

Now RT works no issues but to get it to work I have to enter the entire URL

Ie: http://www.bit.net.au/helpdesk/index.html

In fact if I enter just http://www.bit.net.au/helpdesk I see a directory
listing and index.html is there.

I had this problem too. It seems that the SetHandler prevents DirectoryIndex from working. The RewriteRule stuff is supposed to
avoid this, but I found the following works better:

RT

Alias /rt /opt/rt3010/share/html
PerlModule Apache2 Apache::DBI
PerlRequire /opt/rt3010/bin/webmux.pl

<Directory /opt/rt3010/share/html>
Order allow,deny
Allow from all
Options All
AllowOverride All
AddDefaultCharset UTF-8
<Files *.html>
SetHandler perl-script
PerlHandler RT::Mason

<Directory /opt/rt3010/share/html/Ticket/Attachment>
SetHandler perl-script
PerlHandler RT::Mason

<Directory /opt/rt3010/share/html/SelfService/Attachment>
SetHandler perl-script
PerlHandler RT::Mason

<Directory /opt/rt3010/share/html/REST>
SetHandler perl-script
PerlHandler RT::Mason

END RT

Max.

James Austin wrote:

Hi, on first look it seems that you need add to httpd.conf
DirectoryIndex index.html its default name of index file,
which apache is looking for.
hope it help

Its already enabled in the global configuration for main and all servers. In
fact index.html works everywhere but under /helpdesk

Regards
james

I added this line to my apache config -:

RedirectMatch permanent (.*)/$ http://rt$1/index.html

signature.asc (254 Bytes)

Hi,

I understand the (.*)/$ but the rt in this http://rt$1/index.html

Can you explain the rt$ to me?

Regards
BIT.net Pty. Ltd
James Austin
CEO

m: 0410 59 0000
e: jea@bit.net.au
w: www.bit.net.au

smime.p7s (4.23 KB)

Guys,

Thanks tons I read apache a lot and understand the reasoning behind the
redirect.

Working now thanks!

Regards
BIT.net Pty. Ltd
James Austin
CEO

m: 0410 59 0000
e: jea@bit.net.au
w: www.bit.net.au

smime.p7s (4.23 KB)