Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to redefine the base URL of a Tomcat webservice, mounted with JkMount. I tried the following:

JkMount /myapp/* ajp13_worker
RewriteRule ^/service/v1/(.*)$ /myapp/$1 [PT,QSA]

The original URLs work, for instance:


The URL that I was trying to obtain were:


But they return 404 (from Apache, not from Tomcat). How to make it work?

UPDATE: I just forgot

RewriteEngine on

now it works.

share|improve this question

Which mod_jk's version are you running?

Add the below line under the JkMount directive and try again:

JkOptions     +ForwardURIProxy
share|improve this answer
mod-jk 1.2.28-2, I read from the docs that should be the default value. The default value is "ForwardURIProxy" since version 1.2.24. Anyway as I wrote in the update adding "RewriteEngine on" works. – stivlo Oct 3 '11 at 10:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.