[rt-users] two domains, one RT?

Darren Nickerson darren at dazza.org
Sun Feb 24 12:27:09 EST 2002


>>>>> On Mon, 18 Feb 2002,"Bruce" == Bruce Campbell wrote:

  Bruce> On Mon, 18 Feb 2002, Darren Nickerson wrote:

  +> I'd like to setup RT for two projects I support - www.hylafax.org and
  +> www.tpc.int. I normally host everything from these two domains on one server,
  +> and so I'm wondering how practical it's going to be to have two separate RT
  +> installations running on the same box.

  Bruce> Your first option should be:

  Bruce> Can I run the same RT2 installation, and just have different queue
  Bruce> names (with corresponding changes to the submission address) ?

  Bruce> Note that in such a setup, you will share the same ticket number space
  Bruce> (not really a problem, but the tag ($rtname) will be the same in both
  Bruce> cases.  If you want a different tag for each queue, you can hack the code,
  Bruce> or effectively have two seperate installations.)

  +> Are there any alternatives to installing RT twice, in

  +> /usr/local/rt2-hylafax/
  +> /usr/local/rt2-tpc/

  +> complete with two separate databases?

  Bruce> If you want to run seperate RT2 databases, then I'd suggest installing RT2
  Bruce> into /usr/local/rt2, then create two seperate config files, as per:

  Bruce> /usr/local/rt2/etc/tpc/config.pm
  Bruce> /usr/local/rt2/etc/hylafax/config.pm

  Bruce> You then need to create two seperate Virtualhost directives, changing
  Bruce> /usr/local/rt2/etc to /usr/local/rt2/etc/{tpc,hylafax} as appropriate.
  Bruce> Finally, create /usr/local/rt2/bin/{tpc,hylafax}-webmux.pl from
  Bruce> /usr/local/rt2/bin/webmux.pl, changing the lib directories within as
  Bruce> appropriate.

  Bruce> Repeat the excercise for /usr/local/rt2/bin/rt-mailgate.  Presto - two
  Bruce> installations sharing the RT libraries.  Or you could just symlink away ;)


Well, I finally had a chance to take a crack at this. It occurred to me that
I might like to upgrade/customize the RT installations separately, and so it
made sense not to co-mingle the components at all. I installed two completely
independent RT installations, in:


	/usr/local/rt2-tpc
and
	/usr/local/rt2-hyla

Here's apache's two VirtualHost containers:

<VirtualHost 216.152.199.8>
ServerName support.tpc.int
ServerAdmin tpcadmin at tpc.int
ErrorLog logs/support.tpc.int-error_log
CustomLog logs/support.tpc.int-access_log common
DocumentRoot /usr/local/rt2-tpc/WebRT/html
PerlModule Apache::DBI
PerlFreshRestart On
PerlRequire /usr/local/rt2-tpc/bin/webmux.pl
<Location />
 SetHandler perl-script
 PerlHandler RT::Mason
</Location>
</VirtualHost>

<VirtualHost 216.152.199.8>
ServerName support.hylafax.org
ServerAdmin webmaster at hylafax.org
ErrorLog logs/support.hylafax.org-error_log
CustomLog logs/support.hylafax.org-access_log common
DocumentRoot /var/www/vhosts/support.hylafax.org/html
    <Directory "/var/www/vhosts/support.hylafax.org/html">
	Options None
	AllowOverride None
    	Order allow,deny
    	Allow from all
    </Directory>
PerlModule Apache::DBI
PerlFreshRestart On
PerlRequire /usr/local/rt2-hyla/bin/webmux.pl
Alias /rt/ /usr/local/rt2-hyla/WebRT/html/
<Location /rt>
 SetHandler perl-script
 PerlHandler RT::Mason
</Location>
</VirtualHost>

apachestl configtest reports:

[root at polaris rt-2-0-11]# apachectl configtest
Subroutine SetContentType redefined at /usr/local/rt2-hyla/bin/webmux.pl line 88.
Subroutine CGIObject redefined at /usr/local/rt2-hyla/bin/webmux.pl line 93.
Subroutine handler redefined at /usr/local/rt2-hyla/bin/webmux.pl line 122.
Syntax OK

which is a bit worrying, but apparently non-fatal.

Sadly, when this config is activated in apache only the first virtual host container gives a functional RT. The second one gives:

==> /var/log/httpd/support.hylafax.org-error_log <==
[Sun Feb 24 08:21:27 2002] [warn] [Mason] Cannot resolve file to component: /usr/local/rt2-hyla/WebRT/html/index.html (is file outside component root?)

Reversing the order of the VirtualHost containers does not help - again the second one fails with:

==> /var/log/httpd/support.hylafax.org-error_log <==
[Sun Feb 24 08:24:15 2002] [warn] [Mason] Cannot resolve file to component: /usr/local/rt2-hyla/WebRT/html/index.html (is file outside component root?)


Am I missing something obvious, or is it going to be impossible to run RT2 from two different VirtualHosts which don't share a common DocumentRoot?

-Darren






More information about the rt-users mailing list