title: Multiple web applications with Apache 2.4
body: <p>I want to have two webapps (webapp1 and webapp2 resident under /var/www/html/webapps/), both using PHP and JSP, running on the same machine:</p>
  
  <ul>
  <li>Apache 2.4</li>
  <li>Tomcat 7.0.50 (+APJ connector)</li>
  </ul>
  
  <p>and want to make them accessible through the following URLs (with identical IP and ports):</p>
  
  <pre><code>localhost/webapp1
  localhost/webapp2
  </code></pre>
  
  <p>I am aware of Virtual Hosts facility. The problem is that Apache seems to "see" only the first site available: whenever I look for localhost/webapp2, I get a 'Not Found' error. Note that if I look for "localhost:8080/webapp2" (i.e., bypassing apache2) everything works fine.</p>
  
  <p>Each webapp has its own conf file under sites-available directory. For example, in webapp2.conf I have</p>
  
  <pre><code>JkMountCopy On
  JkMount /webapp2/* tomcat_worker
  </code></pre>
  
  <p>How can I solve?</p>