You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Abramow, Michael [JJPAU]" <MA...@JJPAU.JNJ.COM> on 2002/08/07 00:12:46 UTC

Passing a cgi scrip using mod_proxy to Server behind Firewall

 am using an Apache 1.3.23 server on Solaris 2.8 as a reverse proxy with
mod_proxy.
I am using the ProxyPass/ProxyPassReverse directives to adjust the URL in
the Location header on HTTP redirect responses.
To a server behind our FW.
The basics..
say for my local server http://wibble.org/; I am using the following 

   ProxyPass         /mirror/foo/ http://foo.com/
   ProxyPassReverse  /mirror/foo/ http://foo.com/

works fine - local request for the <http://wibble.org/mirror/foo/bar> to be
internally converted into a proxy request to <http://foo.com/bar> and also
redirects from the server foo.com are taken care of before fwding to the
client.


But the problem lies in passing a cgi script to say
http://foo.com/cgi-bin/abc?def+ghi+jki

trying

   ProxyPass         /test/ http://foo.com/cgi-bin/
   ProxyPassReverse  /test/ http://foo.com/cgi-bin/

Thus trying http://wibble.org/test/abc?def+ghi+jki getting passed via proxy
to http://foo.com/cgi-bin/abc?def+ghi+jki
get a browser error on failing on :

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /test/abc
Reason: Could not connect to remote machine: Connection timed out

  ie. seems not top be passing (browser not interpreting correctly) the
whole cgi script to the server behind the FW... (up to the ?)

I'm pretty sure the cgi script could be regex'ed with a script alias or mod-rewrite rule but is
there anyone has done this or has any ideas to solve this would be much
appreciated.
Thanks
Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org