0

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

1 Answers1

0

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.
Alastair McCormack
  • 2,184
  • 1
  • 15
  • 22