title: How to mount context-referenced Tomcat application with mod_jk?
body: <p>I have an WAR application running in Tomcat at <code>/foo</code> context, meaning that its URL is <code>http://example.com:8080/foo</code>. Now I'm trying to connect Apache HTTP Server to Tomcat through <a href="http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html" rel="noreferrer">mod_jk</a>. This is my <a href="http://tomcat.apache.org/connectors-doc/reference/workers.html" rel="noreferrer"><code>workers.properties</code></a> file:</p>
  
  <pre><code>worker.list=foo
  worker.foo.port=8009
  worker.foo.host=localhost
  worker.foo.type=ajp13
  worker.foo.mount=/foo/*
  </code></pre>
  
  <p>Works fine, but at this URL: <code>http://example.com/foo</code>. I would like it to be at <code>http://example.com</code>. What am I missing?</p>
  
  <p>ps. This is my <code>mod-jk.conf</code>, which is included into <code>httpd.conf</code>:</p>
  
  <pre><code>LoadModule jk_module modules/mod_jk.so
  JkWorkersFile /usr/local/tomcat/conf/workers.properties
  &lt;VirtualHost *:80&gt;
    ServerName foo.example.com
    JkMount /* foo
  &lt;/VirtualHost&gt;
  </code></pre>