httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <>
Subject Re: Mod_proxy_http override
Date Tue, 24 Mar 2009 22:33:11 GMT
On 24.03.2009 19:57, Dingwell, Robert A. wrote:
> Hi,
> Is there a way to override http proxy handling to use a different module
> other then mod_proxy_http?  I¹ve been trying to use apache as a forwarding
> proxy but I have an issue with the way it handles connection refused cases
> from a server. 
> I believe my issue lies within the code section below from the
> proxy_http_handler  function in mod_proxy_http.c but I want to make sure I
> understand this correctly.
> Step One is looking up the address of the server to contact on behalf of the
> client, if it cannot find an address for  the server it fails and goes onto
> cleanup which will send Ostatus¹ back to the client.
> Getting to Step Two means that it found an address and Step Two itself is
> going to attempt to make the initial connection to that address.  My issue
> then comes into play where the address of a server is known but the server
> could refuse the connection on a particular port for some reason such as the
> site is down, or whatever.   If this happens and Apache is configured to
> ProxyRequests, the status is set to HTTP_NOT_FOUND, which really isnt the
> case, the server refused the connection it's not that the page wasn't found.
> Am I mistaken is thinking that r->proxyreq == PROXYREQ_PROXY  is always true
> when ProxyRequests is set to On in the configuration? If so how do I force

Yes. It is only true for forward proxy requests not for reverse proxy requests.

> the HTTP_SERVICE_UNAVAILABLE instead of the HTTP_NOT_FOUND? Do I have to

IMHO it shouldn't send either but a HTTP_BAD_GATEWAY.



View raw message