simple apache2 reverse proxy setup not working

Posted by Nick on Server Fault See other posts from Server Fault or by Nick
Published on 2010-10-28T13:33:59Z Indexed on 2011/01/08 14:55 UTC
Read the original article Hit count: 363

Filed under:
|

I know what proxy is (very high level), it's just I have never set up one, and it feels like I might be missing some big fat point here.

My setup:

  1. client
  2. server (static IP), runs apache on port 80
  3. proxy (has 2 network cards, one is on the clients network, the other one with a static IP on the server network), runs apache on port 80

I am trying to configure these three machines so that when client requests:

http://proxy/machine1

It gets served server's pages at server root URL, i.e.

http://server/

I can access client pages just fine. However, when I try accessing a page from the client machine, it simply gets redirected to server's IP address, which it clearly can't access since they are not on the same network:

... <meta http-equiv="REFRESH" content="0;url=http://server/machine1"></meta> <title>Redirect</title> ...

My apache2 config is:

LoadModule proxy_module /modules/mod_proxy.so
LoadModule proxy_http_module /modules/mod_proxy_http.so


ProxyRequests off

<Proxy *>
    Order Allow,Deny
    Allow from all
</Proxy>

ProxyPass /machine1  http://server:80

<Location /machine1>
    ProxyPassReverse /
</Location>

What gives? Thanks!

© Server Fault or respective owner

Related posts about apache2

Related posts about reverse-proxy