[rt-users] Using RT w/ Perl::Mason on Cobalt with Virtual Host
Josh Kuperman
josh at saratoga.lib.ny.us
Wed Aug 7 16:16:14 EDT 2002
Apologies for cross posting. I have been periodically attempting to
install RT (http://www.fsck.com/projects/rt) on my Sun Cobalt RaQ XTR
(http://www.sun.com/hardware/serverappliances/xtr/index.html).
In previous attempts I would reach a point where I would restart the
web server and get complaints about the document being outside of
component root.
This is complicated by the Virtual Host directive and something odd
built into the RaQ that I don't quite understand. It seems that it is
very hard to get the installation to work on a RaQ with the programs
installed as I installed them. I'm hopeful I can simply change a few
directives in my httpd.conf and it will work.
I created a new virtual host to use for my support website with RT. By
default the RaQ will create a site with the root, as this would be the second site
on this server, in /home/sites/site2/web. I changed the
DocumentRoot as specified in the excerpt from my httpd.conf
below. Since I want to use my RT instalation I changed the document
root to /home/opt/rt2/WebRT/html. If I specify the location block for
the root, i.e. <Location />, then Mason complains that the component
is outside of root.
When I changed it to be as it is below (Starting with '<VirtualHost>, many directives and elements
displayed on the page, but I stopped getting the errors. It
displayed:<& /Elements/Header, Title=>"Start page", Refresh =>
$session{'home_refresh_interval'} &> <& /Elements/Tabs, current_toptab
=> '' &> <& /Elements/CustomHomepageHeader, %ARGS &> <&
/Elements/MyTickets &> <& /Elements/MyRequests &> <&
/Elements/Quicksearch &> <& /Elements/Refresh, Name =>
'HomeRefreshInterval', Default => $session {'home_refresh_interval'}
&> <%init> if ($ARGS{'HomeRefreshInterval'}) {
$session{'home_refresh_interval'} = $ARGS{'HomeRefreshInterval'}; }
<VirtualHost 10.2.1.5>
ServerName support.x.y.com
ServerAdmin admin
#DocumentRoot /home/sites/site2/web
DocumentRoot /home/opt/rt2/WebRT/html
ServerAlias support.x.y.us support.x.y.org
ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST} !^10.2.1.5(:80)?$
RewriteCond %{HTTP_HOST} !^10.2.1.5(:80)?$
RewriteCond %{HTTP_HOST} !^support.x.y.com(:80)?$
RewriteRule ^/(.*) http://support.x.y.com/$1 [L\
,R]
RewriteOptions inherit
#AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site2/users/$1/web/$3
AliasMatch ^/~([^/]+)(/(.*))? /home/opt/rt2/WebRT/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
#PerlModule Apache::DBI
##PerlFreshRestart On
PerlRequire /opt/rt2/bin/webmux.pl
<Location /home/opt/rt2>
SetHandler perl-script
PerlHandler RT::Mason
</Location>
</VirtualHost>
--
Josh Kuperman
josh at saratoga.lib.ny.us
More information about the rt-users
mailing list