title: Mapping a URL between Apache and Tomcat, using mod_jk
body: <p>I am using <code>Apache/2.2.14</code> and <code>Apache Tomcat/6.0.29</code> in a <code>Ubuntu Server 10.04.3 LTS</code>.</p>
  
  <p>This is my <code>jk.conf</code>:</p>
  
  <pre><code>JkWorkersFile /etc/libapache2-mod-jk/workers.properties
  JkMount       /portal/* worker1
  JkLogLevel    debug
  JkMountCopy   All
  </code></pre>
  
  <p>And this is my <code>workers.properties</code>:</p>
  
  <pre><code>ps=/
  
  # Define 1 real worker named worker1
  worker.list=worker1
  
  # Set properties for worker named worker1 to use ajp13 protocol,
  # and run on port 8009
  worker.worker1.type=ajp13
  worker.worker1.host=localhost
  worker.worker1.port=8009
  worker.worker1.lbfactor=1
  worker.worker1.socket_keepalive=1
  worker.worker1.socket_timeout=300
  </code></pre>
  
  <p>The problem is that whenever I try to access tomcat via apache with: <a href="http://my.host.com/portal" rel="nofollow">http://my.host.com/portal</a>, tomcat replies with:</p>
  
  <pre><code>13:39:30,683 INFO  [PortalImpl:3829] Current URL /portal/ generates exception: null
  </code></pre>
  
  <p>The problem goes away if I use a different mountpoint for the worker:</p>
  
  <pre><code>JkMount       /portal/* worker1
  </code></pre>
  
  <p>But this forces me to access my tomcat instance here: <a href="http://my.host.com" rel="nofollow">http://my.host.com</a>, which I do not want.</p>
  
  <p>Is there any way of rewriting the URL using <code>mod-jk</code>?</p>