mod_proxy proxypassreverse on Form Sumbit

--0-420399058-1076875160=:1814
Content-Type: text/plain; charset=us-ascii

I have a third party application running in apache behind a firewall. I decide to install Apache on Windows 2000 to act as a proxy to the server behind the firewall. I'm having trouble getting the proxypassreverse to work for me.

I have www.server2.com/submit.php which is the server running the webapp. I have www.server1.com/app1/submit.php as where the users go. I setup my apache config to the following:

ProxyRequests off

ProxyPass /app1/ http://www.server2.com/
ProxyPassReverse / http://www.server2.com/


All seems ok at first as I have no trouble going to www.server1.com/app1/submit.php and being actually sent to www.server2.com/submit.php. Now the submit.php page is a form that has a submit button on it. The submit button does a POST to www.server2.com/Analyze. What is happening is that when I click on the submit button I see the browser trying to resolve www.server2.com/Analyze instead of www.server1.com/app1/Analyze

However I have no trouble going to www.server1.com/app/Analyze directly. It just seems that mod_proxy doesn't handle forms POSTs. Any help anyone can give me to confirm or deny my findings would be much appreciated. Also, if this should work, if anyone can give me some hints I'd be very greatful.

I've tried all kinds of combinations of proxypass and proxypassreverse, I just can't seem to get the response from the form post back no matter what I try.

Thanks...


---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
--0-420399058-1076875160=:1814
Content-Type: text/html; charset=us-ascii

<DIV>I have a third party application running in apache behind a firewall.  I decide to install Apache on Windows 2000 to act as a proxy to the server behind the firewall.  I'm having trouble getting the proxypassreverse to work for me.  </DIV>
<DIV> </DIV>
<DIV>I have <A href="http://www.server2.com/submit.php">www.server2.com/submit.php</A> which is the server running the webapp.  I have <A href="http://www.server1.com/app1/submit.php">www.server1.com/app1/submit.php</A> as where the users go.  I setup my apache config to the following:</DIV>
<DIV> </DIV>
<DIV>ProxyRequests off</DIV>
<DIV> </DIV>
<DIV>ProxyPass /app1/ <A href="http://www.server2.com/">http://www.server2.com/</A></DIV>
<DIV>ProxyPassReverse / <A href="http://www.server2.com/">http://www.server2.com/</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>All seems ok at first as I have no trouble going to <A href="http://www.server1.com/app1/submit.php">www.server1.com/app1/submit.php</A> and being actually sent to <A href="http://www.server2.com/submit.php">www.server2.com/submit.php</A>.  Now the submit.php page is a form that has a submit button on it.  The submit button does a POST to <A href="http://www.server2.com/Analyze">www.server2.com/Analyze</A>.   What is happening is that when I click on the submit button I see the browser trying to resolve <A href="http://www.server2.com/Analyze">www.server2.com/Analyze</A> instead of <A href="http://www.server1.com/app1/Analyze">www.server1.com/app1/Analyze</A></DIV>
<DIV> </DIV>
<DIV>However I have no trouble going to <A href="http://www.server1.com/app/Analyze">www.server1.com/app/Analyze</A> directly.  It just seems that mod_proxy doesn't handle forms POSTs.  Any help anyone can give me to confirm or deny my findings would be much appreciated.  Also, if this should work, if anyone can give me some hints I'd be very greatful.</DIV>
<DIV> </DIV>
<DIV>I've tried all kinds of combinations of proxypass and proxypassreverse, I just can't seem to get the response from the form post back no matter what I try.</DIV>
<DIV> </DIV>
<DIV>Thanks...</DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Finance: Get your refund fast by filing online
--0-420399058-1076875160=:1814--
Jason Sheneman [ So, 15 Februar 2004 20:59 ] [ ID #34836 ]

Re: mod_proxy proxypassreverse on Form Sumbit

Jason Sheneman wrote:

> ProxyPass /app1/ http://www.server2.com/
> ProxyPassReverse / http://www.server2.com/

> However I have no trouble going to www.server1.com/app/Analyze
> <http://www.server1.com/app/Analyze> directly. It just seems that
> mod_proxy doesn't handle forms POSTs. Any help anyone can give me to
> confirm or deny my findings would be much appreciated. Also, if this
> should work, if anyone can give me some hints I'd be very greatful.

mod_proxy handles form posts fine, use them all the time.

The most likely source of your problem is your URL handling. mod_proxy
does not attempt to rewrite data inside an HTML stream, and therefore it
is likely the links (in your case the destination of the submit button)
on your backend are being passed through the proxy to the browser.

A general rule of thumb that you should apply to keep yourself from
getting headaches is to maintain the same URL strategy on the backend
server as you do in your frontend URL space. In other words, it should
look like this:

ProxyPass /app1/ http://www.server2.com/app1/
ProxyPassReverse /app1/ http://www.server2.com/app1/

Regards,
Graham
--
Graham Leggett [ Mo, 16 Februar 2004 09:49 ] [ ID #34837 ]
Webserver » gmane.comp.apache.mod-proxy » mod_proxy proxypassreverse on Form Sumbit

Vorheriges Thema: Proxy & Real Media
Nächstes Thema: ProxyAllow addition to mod_proxy