httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject BUG? ProxyRemote drops QUERY_STRING, ProxyPass doesn't work!?
Date Tue, 17 Dec 1996 17:32:01 GMT
Hi,

I think this is a bug. I tried several hours to find working
configurations for apache, but to no avail. Or perhaps it should just be
documented?!?


I want to use apache-1.2b3-dev to transparently access a remote host
which is blocked by a firewall, using a proxy host, like this:

    [Proxying Host 99.99.99.99]   <---->   [Firewalled Host 100.100.100.100]
      ^
      |                               ^
      | /|                           / no direct access possible.
      |/ |                          /
	 |                         /
	 v                        /
    [My Host 1.2.3.4]   <--------+

When I access http://99.99.99.99/, I want to forward everything to
http://100.100.100.100/ and deliver its results back to 1.2.3.4.
(so that I do not have to modify my proxy setting just to access the one
host 100.100.100.100)


My first attempt was to use CERN httpd on 99.99.99.99, and the directive
    Pass /*      http://100.100.100.100/*
This worked perfectly fine.

Then I tried to achieve the same with apache running on 99.99.99.99,
using (after reading the manual entry, yes):
    ProxyPass / http://100.100.100.100:80
but then a "GET http://99.99.99.99/" gave me just:
    Proxy Error
    ***********
    The proxy server could not handle this request.
    Reason: Could not connect to remote machine
with the access_log entry
    1.2.3.4 - - [17/Dec/1996:17:52:27 +0100] "GET / HTTP/1.0" 500 247
and the error_log
    [Tue Dec 17 17:52:27 1996] connect: Cannot assign requested address

I added a second config line
    ProxyRemote *   http://100.100.100.100:80
and tried to retrieve "GET http://99.99.99.99/", only to get
    Bad Request
    ***********
    Your browser sent a request that this server could not understand.

This improved when I modified the ProxyPass definition to read
    ProxyPass / http://100.100.100.100:80/
(NOTE the trailing slash!): Now I finally got the root page of
http://100.100.100.100/ all right.

Trying to remove the
    ProxyRemote *   http://100.100.100.100:80
again resulted again in
    Proxy Error
    ***********
    The proxy server could not handle this request.
    Reason: Could not connect to remote machine
so the trailing slash was not the reason why ProxyPass alone (without
ProxyRemote) did not work. BTW: when a '/' is appended to the
ProxyRemote URL (like: "ProxyRemote *   http://100.100.100.100/"), then
the error message
    Proxy Error
    ***********
    The proxy server could not handle this request.
    Reason: Could not connect to remote machine
reappears.


Then I tried to retrieve a CGI-generated page on 100.100.100.100, (with
the proxy settings still set to
    ProxyPass   /   http://100.100.100.100:80/
    ProxyRemote *   http://100.100.100.100:80
like "GET http://99.99.99.99/cgi-bin/printenv?this/fails",
I got the answer from 100.100.100.100:
     DOCUMENT_ROOT=/....
     ...
     GATEWAY_INTERFACE=CGI/1.1
     ...
     QUERY_STRING=
     ...
     REQUEST_METHOD=GET
     ...
     SERVER_PROTOCOL=HTTP/1.0
     SERVER_SOFTWARE=Apache/1.2b3-dev
and in the access_log of 99.99.99.99 there is
    GET http://99.99.99.99/cgi-bin/printenv?this/fails
but in the log of 100.100.100.100 I found
    GET http://99.99.99.99/cgi-bin/printenv
(NOTE the missuing script parameter)

================================================================
Now my questions are:

1)  where did the Script parameter (QUERY_STRING) "this/fails" go?

2)  why is it impossible to get ProxyPass running without ProxyRemote?

3)  why is apache so sensitive to trailing '/' in URL's?

Curious (or perhaps too stupid to understand the manual page??),

    Martin
-- 
| S I E M E N S |  <Martin.Kraemer@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Mime
View raw message