1

I'm on Debian Wheezy with Apache 2.2.2. I previously had all requests for a VirtualHost forwarding to Tomcat using:

JkMount / ajp13_worker
JkMount /* ajp13_worker

Now, I want to exclude one particular URL prefix foo from this setup, but otherwise preserve it. I tried using a LocationMatch directive as follows:

<LocationMatch "^/(?!foo)">
    # JkMount commands
</LocationMatch>

If used as is, I get the following error message:

JkMount can not have a path when defined in a location

But if I try to use JkMount ajp13_worker then I get the error message:

JkMount context should start with /

How can I get the correct behavior only for URLs not starting with /foo?

Jake Cobb
  • 113
  • 4

1 Answers1

2

Alternative to JkMount:

<LocationMatch "^/(?!foo)">
   SetHandler jakarta-servlet
   SetEnv JK_WORKER_NAME ajp13_worker
</LocationMatch>