1

I have a problem with ProxyPass to service that is located in Kubernetes cluster (also, behind domain-name sensitive proxy).

This is my configuration:

<LocationMatch "/service2">
    ProxyPass http://service2.mycluster.org Keepalive=On
</LocationMatch>

When I call this service, I'm getting 503.

The similar configuration for standalone server apps works:

<LocationMatch "/service1">
    ProxyPass http://myserver.org:8012 Keepalive=On
</LocationMatch>

The only thing that is coming to my mind now is that Apache is making request to the resolved IP, not the domain name.

Because the request to my standalone server using IP will work:

curl -f http://<myserverip>:8012

while to the cluster will fail

curl -f http://<myclusterip>

because the domain name (service2.mycluster.org) is using for internal dispatching.

Am I missing something obvious here? I can't find any hints in documentation, I thought ProxyPass should work out-of-the-box.

1
  • So your hunch is correct. The problem is that Apache caches the resolved IP. And that can change. I don't have a solution though.
    – derfred
    Sep 25, 2019 at 9:50

1 Answer 1

0

It looks.to me like you are missing ProxyPassReverse directives. Each proxypass directive typically needs.to be mated with a similar proxypassreverse directive in the Apache Config.

1
  • Oh, I've tested it as well but it didn't work. I suppose the problem is the request that Apache is sending to cluster...
    – user517216
    May 24, 2019 at 9:49

You must log in to answer this question.