I use the Apache 2.4 web server to proxy incoming HTTP requests to our server servers using the proxypass directive. I also send an outgoing request from our server servers via Apache, again using proxypass, for example.
<Location / outgoingrequest / ">
ProxyPass http://foobar.com/ retry=0 timeout=40 ttl=60
ProxyPassReverse http://foobar.com/
</ Location>
This works fine, I see all incoming and outgoing requests in the Apache log. However, foobar.com is hosted in the AWS cloud and sometimes its IP address changes, which then causes all outgoing requests to fail. A DNS lookup shows the new IP address, so it is clear that mod-proxy caches the IP address. I added ttl = 60, but outgoing requests do not work for several hours.
Is there something that I am missing, or should I do it in a completely different way?
source
share