RT 3.2.2 and apache config of virtual hosts

Hi All,

I’ve been googling around and trying to find a solution, but it’s not
working. I’ve got RT 3.2.2 running on Fedora Core 3 with perl 5.8.5
and httpd 2.0.52-3.1 (Apache). I followed the directions in the Wiki
for making RT3 work with Fedora Core 2 and no problems.

But I do have an interesting issue.

We have both rt3.taec.toshiba.com, as well as rt3.taec.com for
acceptable hostnames. I want to force ALL communication with rt3 via
the web to use the longer name (the corp standard), instead of which
ever name the user connects with.

So currently, if they talk to rt3.taec.toshiba.com, it comes back as
that. If they talk to rt3.taec.com, it doesn’t get re-written to
rt3.taec.toshiba.com in the browser and URL.

I’m not using rt3.taec.com in any of the config files, and I have
ServerName and UseCanonicalName set in the main httpd.conf file:

ServerName rt3.taec.toshiba.com:80
UseCanonicalName On

And in the rt3.conf file I have:

<VirtualHost 209.243.166.67>
   ServerName rt3.taec.toshiba.com
   DocumentRoot /var/lib/rt3/share/html
   AddDefaultCharset UTF-8

   # these four lines apply to Apache2+mod_perl2 only: {{{
   PerlSetVar MasonArgsMethod CGI
   PerlModule Apache2 Apache::compat
   RewriteEngine On
   RewriteRule ^(.*)/$ $1/index.html
   # }}}

   PerlModule Apache::DBI
   PerlRequire /var/lib/rt3/bin/webmux.pl

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

</VirtualHost> 

I must be missing something silly here. Do I need to add a re-write
rule into my VirtualHost directive to fix this? Something like:

 RewriteRule ^rt3.taec.com(.*)/ rt3.taec.toshiba.com/$1

Hmmm, just tried it and no go. I put it directly under the other
re-write rule.

I do have the following in my RT_SiteConfig.pm since user email can
come from @taec.com and we need to handle it properly:

Set($rtname , "TAEC");
Set($Organization , "taec.toshiba.com");
Set($RTAddressRegexp , '^rt\@taec.toshiba.com$|^rt\@taec.com$');
Set($CanonicalizeEmailAddressMatch   , 'taec.com$');
Set($CanonicalizeEmailAddressReplace , 'taec.toshiba.com');
Set($CanonicalizeOnCreate , 0);
Set($WebPath , "");
Set($WebBaseURL , "http://rt3.taec.toshiba.com");
Set($WebURL , $WebBaseURL . $WebPath . "/");

Ah! But I see that in RT_SiteConfig.pm there’s the following:

# $DefaultSearchResultFormat is the default format for RT search results
Set ($DefaultSearchResultFormat, qq{
   '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE
:#',
   '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__Subject__</a></B>/
TITLE:Subject',
   Status,
   QueueName, 
   OwnerName, 
   Priority, 
   '__NEWLINE__',
   '', 
   '<small>__Requestors__</small>',
   '<small>__CreatedRelative__</small>',
   '<small>__ToldRelative__</small>',
   '<small>__LastUpdatedRelative__</small>',
   '<small>__TimeLeft__</small>'});


# }}}

Should I be changing this so that it’s $RT::WebURL instead of
$RT::WebPath, or do I need to just re-define the WebPath? Well
shucks, after changing it and re-starting the web server, there’s no
change. Darnit.

So can anyone tell me what I’m missing here?

Thanks,
John
John Stoffel - Senior Staff Systems Administrator - System LSI Group
Toshiba America Electronic Components, Inc. - http://www.toshiba.com/taec
john.stoffel@taec.toshiba.com - 508-486-1087