httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: [users@httpd] Proxy Config Issues
Date Mon, 19 Nov 2012 11:42:46 GMT
On Sun, Nov 18, 2012 at 1:44 AM, Chris Arnold
<> wrote:
>> I did read the docs and they were some what helpful but not completely.
>> Hence, my email to the list. What i am trying to understand is the sections
>> and what they mean. For instance, ProxyPass /. Does >this refer to what will
>> be proxied?
>>>Correct which is the whole document root in this case.
>>And where the request is proxied?
>>So in my instance, i need to proxy /welcome/client-software.html
>> (ProxyPass) to a whole different apache server (
>>>Correct and thats what you said you want to do right?
>>Or do i have it backwards?
>> I do have this working (not what i wanted but is useable):
>> ProxyPass /
>> ProxyPassReverse /
>>>ProxyPassReverse only makes sense in case of reverse proxy for which you
>>> need to set ProxyRequests to off. So are you trying to set proxy or reverse
>>> proxy?
> According to the proxy docs, i need a ProxyPass
> ProxyPass /path/tofolder.html
> So i need our clients to be able to get to a page from
> Which is on When i access this site,
> now i get a 403 Access denied.

ProxyPass is real simple. When a request comes in to this vhost, if
its URL begins with the first argument to ProxyPass, the request is
proxied. Apache takes off the matching part of the URL, and appends
the rest to the second argument to ProxyPass. It then fetches the
content from that URL, and returns it to the client.

So, if you have this:

ProxyPass /dls/

and the URL /dls/12345/ is requested

then Apache will work out to fetch

Your problem, I think, is that you are specifying the public name of
the website in argument 2 of ProxyPass. This is wrong, it should be
the internal name of the backend you want to proxy to - eg (or whatever). If resolves to, then that would be ok, but that would be a strange

If resolves to your public IP, then that is dead wrong
to go in ProxyPass.

ProxyPassReverse deals with fixing response headers that your backend
generates. Eg, in our example, if the backend generates a redirect, it
would have the wrong Location header - it would say
"" instead of
"". So you need to tell it
to replace "" with "".

Apache can figure out its hostname and protocol fine, so that boils down to:

ProxyPassReverse /dls/

Note that if your backend instead returned a Location header like
"http://the-backend/12345/", then that would not get
rewritten. You need to tell httpd all the possible host permutations
that your backend will generate.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message