0

I have 2 AJP services running in my server and a Apache 2.4 to proxy then.

I want to map this:

# in-development environment
<Location "/dev">
    ProxyPass ajp://127.0.0.1:3001/dev/
</Location>

# in production environment
<Location "/">
    ProxyPass ajp://127.0.0.1:3000/
</Location>

But when I access http://myserver/dev it proxies to ajp://127.0.0.1:3000/ instead of ajp://127.0.0.1:3001/.

Beto Neto
  • 515
  • 1
  • 4
  • 10

1 Answers1

1

This is because of the way Overlapping Webspace is handled by the <Location> directive. As noted in the Apache documentation,

In order to have two overlapping URLs one has to consider the order in which certain sections or directives are evaluated. For <Location> this would be:

<Location "/foo">
</Location>
<Location "/foo/bar">
</Location>
Colt
  • 1,939
  • 6
  • 20
  • 25