Apache proxypass IP addresses

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?

+4
source share
1 answer

You are trying to completely disable the Apache connection pool with:

ProxyPass http://foobar.com/ retry=0 disablereuse=On

The documentation says:

This helps in various situations (..), when the backends themselves can be under a circular DNS server.

0
source

Source: https://habr.com/ru/post/1616496/


All Articles