Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm trying to figure out why my apache2 reverse proxy doesn't work... hope someone can clarify.

i'm using an apache server as a gateway with proxy pass: 10.184.1.2 is the IP. these are PP instructions i inserted in the 000-default config file.

ProxyPass / http://192.168.102.31/

ProxyPassReverse / http://192.168.102.31/

the host 192.168.102.31 is an internal IP of a subnet wich is not reachable directly by clients, but only by the apache gateway.

when i try to access such a address: http://apache_gateway_name/dir i see the client trying to reach 192.168.102.31 address and of course timeout occurs.

can someone help? Best regards

share|improve this question

migrated from stackoverflow.com Oct 4 '12 at 14:50

This question came from our site for professional and enthusiast programmers.

It sounds like the ProxyPassReverse isn't matching a 301/302 being returned from the remote Apache server (192.168.102.31), some client-side code is redirecting the browser incorrectly or some server-side code is incorrectly building the redirect location.

  1. Check client side activity using Chrome's dev tool/Firebug/Wireshark. Find out whether the server is issueing a 301/302 or being driving by javascript.
  2. Try removing the trailing slash from ProxyPass* directives
  3. Run tcpdump/wireshark on 192.168.102.31 and see what headers are being returned. Pay particular attention to the "Location" header in the response and "Host" header in the request.
share|improve this answer

Your Answer

 
discard

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