Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

Well it turns out that configuration was right, the problem with redirection happened because http://server:80 redirected to http://server:80/ which was causing all the confusion :) Seems to work excellent now.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.