[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: http proxy with Apache



Your friend should probably just set his browser preferences to use your web
server as proxy for all requests. In order to do what you describe below you'd
have to modify the actual html in the stream to change the links or the target
site would have to use *only* relative links.

Max wrote:

> I'm trying to set up my Apache server to act as a proxy for certain
> requests and I'm not getting the desired behavior.  Over here, we can
> connect to a remote http server that allows access based on IP
> addresses (and we have been granted access).  The problem is that one
> of my users connects remotely and has a different IP address, so I'm
> trying to set up the local Apache server to act on behalf of his
> requests.  So, when he types in http://foo.com/bar, I want that to
> expand to http://bar.com/.  I added the following lines to
> /etc/apache/httpd.conf:
>
> ProxyRequests on
> ProxyPass /bar/ http://bar.com/
> ProxyPassReverse /bar/ http://bar.com/
>
> So, http://foo.com/bar ends up loading http://bar.com/index.html,
> which is what I want.  However, index.html contains links.  Links of
> the form "index2.html" get interpreted properly as
> http://foo.com/bar/index2.html but links of the form
> "/blah/index3.html" get interpreted as
> http://foo.com/blah/index3.html, which obviously fails.  Does anyone
> know how to fix this and force ALL links on bar.com to go through
> http://foo.com/bar?
>
> Thanks,
>     Max
>
> --
> The hopeful depend on a world without end
> Whatever the hopeless may say
>      Neil Peart, 1985
>
>   ------------------------------------------------------------------------
>    Part 1.2Type: application/pgp-signature

--
Jens B. Jorgensen
jjorgens@bdsinc.com



Reply to: