[rt-users] Web interface, Mandrake 8.1, perl proxying--solution

Toby Wahlers toby at vidiom.com
Thu Nov 8 19:37:37 EST 2001


For posterity, here's what I had to do to get a subdirectory config working 
with a perl proxy server:

In commonhttpd.conf
put the Alias in the same section as the perl and cgi-perl aliases:
<IfModule mod_perl.c>
#Provide two aliases to the same cgi-bin directory,
#to see the effects of the 2 different mod_perl modes
#for Apache::Registry Mode
Alias /perl/ /var/www/perl/
#for Apache::Perlrun Mode
Alias /cgi-perl/ /var/www/perl/
Alias /rt2/ /opt/rt2/WebRT/html/
</IfModule>

In httpd.conf, put in the ProxyPass statement(s):
<IfDefine PERLPROXIED>
RewriteEngine on
RewriteRule ^proxy:.* - [F]
RewriteRule ^(.*\/perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/cgi-perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
ProxyPass /rt2/ http://localhost:8200/rt2/
ProxyPassReverse /rt2/ http://localhost:8200/rt2/
</IfDefine>

In httpd-perl.conf, put in the location settings:
# Mason section
Include conf/httpd-mason.conf
#set RT:Mason Mode for /rt2 Alias
PerlModule Apache::DBI
PerlRequire /opt/rt2/bin/webmux.pl
<Location /rt2/>
SetHandler perl-script
PerlHandler RT::Mason
Options ExecCGI
</Location>



At 10:19 PM 11/7/2001, you wrote:
"the best idea right now is to look at apache's error log and try to figure
things out from there. "

That's just it.  There are no errors in the log.  Neither the regular 
error_log nor the perl-error_log.  It's not even trying to hook into Mason, 
just showing the page as html, so no errors.  It's hard to list rt setup in 
apache, cause I've tried it a half dozen or more ways.  One person in  the 
archived list said they got this working:
<Directory /usr/local/rt2/WebRT/html>
   AllowOverride None
   Options None ExecCGI FollowSymLinks
   Order allow,deny
   Allow from all
   PerlRequire /usr/local/rt2/bin/webmux.pl
   PerlModule Apache::DBI
   SetHandler perl-script
   PerlHandler RT::Mason
   Options ExecCGI
</Directory>

Another made use of Location:
PerlModule Apache::DBI
PerlRequire /usr/local/rt2/bin/webmux.pl
<Location /rt2>
   SetHandler perl-script
   PerlHandler RT::Mason
</Location>

Tried 'em both, and variants, no luck.
I have a ProxyPass statement in my normal server httpd.conf:
ProxyPass /rt2/ http://localhost:8200/rt2/
and of course I do have the correct /rt2 alias in the commonhttpd.conf (or 
it wouldn't even get to the page).

From: Toby Wahlers <toby at vidiom.com>

toby> I have tried about every possible permutation of the apache config files,
toby> but I have only gotten rt to work with the default VirtualHost setup 
(which
toby> I don't want).  Mostly I get the index page as source text with a Go!
toby> button, but with other (mis)configurations I've gotten malformed header
toby> messages. I'm running Mandrake Linux, which by default has 2 apache 
servers
toby> running, one of them a perl proxy. I've looked at all the list archives,
toby> and a few people have had the same problem, though with different
toby> configurations.  I want a subdirectory configuration and need to use an
toby> alternate port, e.g. http://www.myserver.com:81/rt2/, and would like 
it to
toby> work with my current dual server config.  Apache has 3 config files,
toby> httpd.conf, commonhttpd.conf, and httpd-perl.conf. I have the Alias in
toby> commonhttpd.conf, 'cause that's where it wants to be. I have added
toby> ProxyPass to the httpd.conf, and have tried <Directory> or <Location>
toby> setups in all 3 config files, nothing seems to help.  Any ideas?

Yup.  I had the same problem when I started playing with rt2, and the
best idea right now is to look at apache's error log and try to figure
things out from there.  In my case, it was a combination of having
some trouble with something not existing in the @INC directories of
the scripts I used and some permission bits somewhere.  It's very
possible that your apache configuration is just fine (it was in my
case).

Try that, and if you can't still figure it out, I suggest you get back
here with *details* (like the part of the configuration concerning rt
and perhaps the last parts of the error log if that's relevant).

--
Richard Levitte   \ Spannvägen 38, II \ LeViMS at stacken.kth.se
Redakteur at Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
                     \      SWEDEN       \ or +46-733-72 88 11
Procurator Odiosus Ex Infernis                -- poei at bofh.se
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, GemPlus:             http://www.gemplus.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.

_______________________________________________
rt-users mailing list
rt-users at lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users




_______________________________________________
rt-users mailing list
rt-users at lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users



--
Regards,
Toby Wahlers
Vidiom Systems
toby at vidiom.com
303-604-0800x121
Fax 303-604-0080



_______________________________________________
rt-users mailing list
rt-users at lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users


--
Regards,
Toby Wahlers
Vidiom Systems
toby at vidiom.com
303-604-0800x121
Fax 303-604-0080






More information about the rt-users mailing list