<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Solved: RE: [rt-users] Problem accessing RT located behind an apache proxy</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi Andrew,<BR>
<BR>
That option sounds like it should not be it as it works on the incoming headers but it does work.<BR>
<BR>
I will work on adding this to the wiki. I do not think the Redhat/CentOS 5 server required this. The RedHat/Centos 4 server did though.<BR>
<BR>
Thanks for the help!<BR>
<BR>
Keith<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Andrew Smith [<A HREF="mailto:andrew@coolchilli.com">mailto:andrew@coolchilli.com</A>]<BR>
Sent: Tue 10/30/2007 12:42 AM<BR>
To: Schincke, Keith D. (JSC-IT)[MEI]<BR>
Cc: Kris Boutilier; rt-users@lists.bestpractical.com<BR>
Subject: Re: [rt-users] Problem accessing RT located behind an apache proxy<BR>
<BR>
Hi Keith,<BR>
<BR>
Just a stab in the dark, have you tried ProxyPreserveHost On? I know it<BR>
rewrites the Host: value in the header, not sure if that would help RT.<BR>
<BR>
Regards<BR>
Andrew<BR>
<BR>
Schincke, Keith D. (JSC-IT)[MEI] wrote:<BR>
><BR>
> Hey Kris,<BR>
><BR>
> All of the html, images and javascript is loading correcting<BR>
><BR>
> I used firebug to peak at the HTTP headers. It looks like the<BR>
> "Location:" field is set to direct the browser to load the<BR>
> Display.html file to display the updated ticket.<BR>
><BR>
> The ProxyPass and ProxyPassReverse options should be changing the<BR>
> response headers.<BR>
><BR>
> Below is the relevant parts of my apache config file.<BR>
><BR>
> Any help will be greatfully appricated.<BR>
><BR>
> Keith<BR>
><BR>
> RewriteEngine on<BR>
> RewriteLog /var/log/httpd/rewrite.log<BR>
> RewriteLogLevel 0<BR>
> RewriteRule ^/$ <A HREF="https://rt.example.com/rt/">https://rt.example.com/rt/</A> [R,L]<BR>
> RewriteRule ^/rt$ <A HREF="https://10.0.0.1/rt/">https://10.0.0.1/rt/</A> [P,L]<BR>
> RewriteRule ^/rt/(.*)$ <A HREF="https://10.0.0.1/rt/$1">https://10.0.0.1/rt/$1</A> [P,L]<BR>
><BR>
> ProxyRequests off<BR>
> SSLProxyEngine on<BR>
> <Location /><BR>
> ProxyPass <A HREF="https://10.0.0.1/">https://10.0.0.1/</A><BR>
> ProxyPassReverse <A HREF="https://10.0.0.1/">https://10.0.0.1/</A><BR>
> </Location><BR>
><BR>
><BR>
><BR>
> -----Original Message-----<BR>
> From: Kris Boutilier [<A HREF="mailto:Kris.Boutilier@scrd.bc.ca">mailto:Kris.Boutilier@scrd.bc.ca</A>]<BR>
> Sent: Mon 10/29/2007 11:38 AM<BR>
> To: Schincke, Keith D. (JSC-IT)[MEI]<BR>
> Cc: rt-users@lists.bestpractical.com<BR>
> Subject: RE: [rt-users] Problem accessing RT located behind an apache<BR>
> proxy<BR>
><BR>
> Most likely you'll need to use something like mod_proxy_html to<BR>
> manipulate occurances of the private address within the body of the<BR>
> http stream. You could confirm this by using Wireshark to look at the<BR>
> contents of the http replies on both sides of the Apache server and<BR>
> see exactly where the offending addresses are being embedded.<BR>
><BR>
> mod_proxy_html is a perfect tool for doing in-line rewrites of<BR>
> javascript, css and other complexities generated by proxied web apps.<BR>
> See <A HREF="http://apache.webthing.com/mod_proxy_html/">http://apache.webthing.com/mod_proxy_html/</A><BR>
><BR>
> Kris Boutilier<BR>
> Information Services Coordinator<BR>
> Sunshine Coast Regional District<BR>
><BR>
> ________________________________<BR>
><BR>
> From: rt-users-bounces@lists.bestpractical.com<BR>
> [<A HREF="mailto:rt-users-bounces@lists.bestpractical.com">mailto:rt-users-bounces@lists.bestpractical.com</A>] On Behalf Of<BR>
> Schincke, Keith D. (JSC-IT)[MEI]<BR>
> Sent: Sunday, October 28, 2007 8:33 AM<BR>
> To: rt-users@lists.bestpractical.com<BR>
> Subject: [rt-users] Problem accessing RT located behind an<BR>
> apache proxy<BR>
> <BR>
> <BR>
><BR>
><BR>
> Hey Guys,<BR>
> <BR>
> I am having issues accessing parts of my RT installation while<BR>
> it is located behind an apache proxy.<BR>
> <BR>
> My configuration is:<BR>
> RT is installed on a server on a private network.<BR>
> Apache is installed on a server on the public network that<BR>
> will proxy with mod_rewrite access to the RT server.<BR>
> <BR>
> This configuration works great for most parts of the RT<BR>
> system. Tickets can be looked at. Users can be added.<BR>
> The problem occurs when a ticket or user is updated.<BR>
> <BR>
> When a ticket is updated, Update.html is called, the ticket is<BR>
> update and the browser is redirected to Display.html.<BR>
> <BR>
> The redirect is what is causing my problems. The application<BR>
> is tries to send the browser to the private IP address to load<BR>
> Display.html.<BR>
> <BR>
> Here is my configuration:<BR>
> Front end apache server:<BR>
> Centos 4.5<BR>
> httpd 2.0.52<BR>
> <BR>
> Here are the rewrite rules:<BR>
> <VirtualHost *:80><BR>
> RewriteEngine on<BR>
> RewriteLog /var/log/httpd/rewrite.log<BR>
> RewriteLogLevel 2<BR>
> RewriteRule ^/$ <A HREF="http://10.0.0.1/rt">http://10.0.0.1/rt</A> [P,L]<BR>
> RewriteRule ^/(.*)$ <A HREF="http://10.0.0.1/$1">http://10.0.0.1/$1</A> [P,L]<BR>
> ProxyPass / <A HREF="http://rt.example.com/">http://rt.example.com/</A><BR>
> ProxyPassReverse / <A HREF="http://rt.example.com/">http://rt.example.com/</A><BR>
> </VirtualHost><BR>
> <BR>
> <BR>
> Backend server:<BR>
> Debian etch<BR>
> Aapche 2<BR>
> RT 3.6<BR>
> <BR>
> My $WebBaseURL is <A HREF="http://rt.example.com">http://rt.example.com</A><BR>
> <BR>
> Any suggestions on what may be causing the rewrite to not work<BR>
> correctly?<BR>
> <BR>
> Thanks for any help,<BR>
> <BR>
> Keith<BR>
><BR>
><BR>
> ------------------------------------------------------------------------<BR>
><BR>
> _______________________________________________<BR>
> <A HREF="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</A><BR>
><BR>
> SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:<BR>
><BR>
> If you sign up for a new RT support contract before December 31, we'll take<BR>
> up to 20 percent off the price. This sale won't last long, so get in touch today.<BR>
> Email us at sales@bestpractical.com or call us at +1 617 812 0745.<BR>
><BR>
><BR>
> Community help: <A HREF="http://wiki.bestpractical.com">http://wiki.bestpractical.com</A><BR>
> Commercial support: sales@bestpractical.com<BR>
><BR>
><BR>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<BR>
> Buy a copy at <A HREF="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>