Apache: does a ProxyPass proxy a <Location> itself, or just the *contents* of that Location?

15 Views Asked by At

I know, sounds like a stupid question, but bear with me. In this setup:

<Location /a/b/c/d>
  ProxyPass http://localhost:8080/a/b/c/d
</Location>
<Location /a/>
  ProxyPass http://localhost:8080/
</Location>

If I access https://example.com/a/b/c/d the mod_proxy debug shows that the second proxy is being used (it's not very verbose, but this appears to be what it's saying). And, in fact, I'm seeing an access to http://localhost:8080/b/c/d, which won't work (another module must see exactly the path in the first ProxyPass).

There's no ordering problem here, so I have no idea what's going on. The docs aren't very clear on this, because they always use a suffix (extra path component) in the examples, like this one, where an access to http://example.com/mirror/foo/bar is proxied to http://backend.example.com/bar:

<Location "/mirror/foo/">
    ProxyPass "http://backend.example.com/"
</Location>

So what happens to an access to http://example.com/mirror/foo?

0

There are 0 best solutions below