title: Apache with JKMount and Alias
body: <p>I am currently having issue with apache config with JKMount and Alias.</p>
  
  <p>I mounted my application with JKMount</p>
  
  <pre><code>    JkMount /app1/*.jsp app1
      JkMount /app1/* app1
  </code></pre>
  
  <p>I have some static images on my local file system.</p>
  
  <p>if the url is like <a href="http://testapp.com/app1/capture/testImg.jpg" rel="nofollow">http://testapp.com/app1/capture/testImg.jpg</a> then I have to serve the image from my C:/capture/testImg.jpg.</p>
  
  <p>For this I used AliasMatch </p>
  
  <pre><code>AliasMatch /app1/capture/(.*)$ C:/capture/img/$1 
  </code></pre>
  
  <p>The problem here I can't use AliasMatch in conjection with JKMount.</p>
  
  <p>If I comment JKMount part then I can access image. But my application is not working.</p>
  
  <p>If I uncomment JKMount part my application is working but I can't access images.</p>
  
  <p>This is my configuration in httpd.conf</p>
  
  <pre><code>   NameVirtualHost testapp.com
     &lt;VirtualHost testapp.com:80&gt; 
          ServerName testapp.com
      DocumentRoot "Z:\TestApp\app1\src\main\webapp\public"
      AliasMatch /app1/capture/(.*)$ C:/capture/img/$1 
      #&lt;Directory C:/capture/img/&gt;
      #   Order Deny,Allow
      #   Allow from all
      #&lt;/Directory&gt;
      RewriteEngine on   
          RewriteRule ^/(.*) http://testapp.com/$1 [R=301,L]
      JkMount /app1/*.jsp app1
          JkMount /app1/* app1
  
  
      &lt;Directory  C:/capture/img/&gt;
      Order Allow,Deny
      Allow from all
      &lt;/Directory&gt;
  
         ErrorLog "z:\logs\apache_error_log"
         CustomLog "z:\logs\log_custom" combined
      &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Can any one help me with above issue</p>
  
  <p>Thanks</p>