[rt-users] Specifying a private lib directory in apache.conf
Bruce Campbell
bruce_campbell at ripe.net
Mon Dec 24 09:21:30 EST 2001
After not wanting to open up our main internal web server to any memory
leaks that might be introducted by multiple perl handlers running, I've
ended up using a private httpd for RT, run by the rt user. Whilst I was
at it, I also installed the required libraries in the rt home directory,
as I didn't want the libraries installed globally.
Note that when installing the required perl libraries (as per testdeps),
the recommended procedure is to 'perl Makefile.PL', 'vi Makefile' to
change the PREFIX to be /your/rt2/path, then merrily 'make install'.
tools/testdeps in the src does require a small change, being the addition
of: "use lib '/your/rt2/path/lib';" and "use lib
'/your/rt2/path/site_perl';" in order to complete. You may also need to
juggle the installed libraries around somewhat if your web server is a
different machine than your installation.
Magic for httpd.conf:
<VirtualHost _default_:8081>
DocumentRoot /your/rt2/path/WebHTML
ServerName your.server.name
ServerAlias your-server-alias
ErrorLog /your/error/log/path
CustomLog /your/access/log/path combined
# The following doesn't work immediately.
# PerlModule Apache::DBI
# Invoke Perl to get the @INC.
# http://perl.apache.org/dist/mod_perl-1.26/t/conf/httpd.conf-dist
<Perl>
push @INC, "/your/rt2/path/lib";
push @INC, "/your/rt2/path/site_perl";
</Perl>
# This now works once @INC has bene modified
PerlModule Apache::DBI
PerlRequire /your/rt2/path/bin/webmux.pl
<Location />
SetHandler perl-script
PerlHandler RT::Mason
</Location>
</VirtualHost>
As always, use this at your own risk.
--
Bruce Campbell RIPE
NCC
Operations
More information about the rt-users
mailing list