[rt-users] How to run multiple instances of RT on a single instance of Apache

Bob Goldstein bobg at uic.edu
Tue Dec 2 10:33:37 EST 2003


I've got this working, but with fastcgi.  You can't use mod_perl
at least in any simple way, because each apache child will
have a single namespace for perl modules, e.g. RT::....
So when webmux1.pl does 'use RT;' and webmux2.pl also
does a 'use RT;' even with a different @INC, they collide
in the RT space.

Fastcgi uses different processes, one for each instance of RT
Each process can have its own perl space, so no collisions.

If you're interested, contact me privately.  I've made some
minor modes to RT to make this process easier and more
maintainable.  If I can explain it to you, then I can
explain it to everyone else as well :-)

   bobg


>I'm an RT newbie and definitely not an Apache guru.  I want to run multiple
>RTs: one for testing and another for production.  I'm trying to use name
>based virtual hosts in httpd.conf to do this, but I get the following error:
>
>  Subroutine handler redefined at /var/lib/rt3/instance2/bin/webmux.pl line
>122.
>
>I'm using apache 1.3.29, mod_perl 1.29 (statically linked), and RT 3.0.6 on
>RedHat Linux 9 (stock 2.4.20-6smp kernel).  The Perl is stock from RedHat,
>but I built apache and mod_perl.
>
>Here's the virtual host stuff from my httpd.conf.  Perhaps there is a
>better/different way to do this.  Any help would be greatly appreciated.
>
>--- snip snip ---
>[...]
>NameVirtualHost *
>
><VirtualHost *>
>  ServerName real_name.domain.com
></VirtualHost>
>
><VirtualHost *>
>  ServerName alias1.domain.com
>  DocumentRoot /var/lib/rt3/instance1/share/html
>  AddDefaultCharset UTF-8
>  PerlModule Apache::DBI
>  PerlRequire /var/lib/rt3/instance1/bin/webmux.pl
>  <Location />
>    SetHandler perl-script
>    PerlHandler RT::Mason
>  </Location>
></VirtualHost>
>
><VirtualHost *>
>  ServerName alias2.domain.com
>  DocumentRoot /var/lib/rt3/instance2/share/html
>  AddDefaultCharset UTF-8
>  PerlModule Apache::DBI
>  PerlRequire /var/lib/rt3/instance2/bin/webmux.pl
>  <Location />
>    SetHandler perl-script
>    PerlHandler RT::Mason
>  </Location>
></VirtualHost>
>[...]
>--- snip snip ---
>
>Thanks,
>
>--- Mike R. Prevost
>
>_______________________________________________
>rt-users mailing list
>rt-users at lists.fsck.com
>http://lists.fsck.com/mailman/listinfo/rt-users
>
>Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>



More information about the rt-users mailing list