title: Setting up Apache mod_jk in ssl VirtualHost
body: <p>I'm having problems moving my Apache mod_jk configuration form its own VirtualHost configuration into my main ssl VirtualHost configuration.</p>
  
  <p>Tomcat is working ok using its own domain using mod_jk and a VirtualHost configuration - working config....</p>
  
  <pre><code>LoadModule jk_module  /etc/httpd/modules/mod_jk.so
  JkWorkersFile /etc/httpd/conf.d/workers.properties
  JkShmFile     /var/log/httpd/mod_jk.shm
  JkLogFile     /var/log/httpd/mod_jk.log
  JkLogLevel    info
  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
  
  &lt;VirtualHost *:80&gt;
      ServerName &lt;my cname&gt;
      DocumentRoot /opt/appserver/webapps/ROOT
      DirectoryIndex index_page.jsp       
  
      &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
      &lt;/Directory&gt;
  
      &lt;Directory /opt/appserver/webapps/ROOT&gt;
                  AllowOverride None
                  Options FollowSymLinks
                  Order allow,deny
                  allow from all
      &lt;/Directory&gt;
  
      JkMount /* ajp13
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>however because I want to embed my Tomcat forms in my main server pages which are ssl (can't mix http and https) I need to move my mod_jk configuration into my main ssl VirtualHost as a subfolder. I've tried the following changes, but I get a Tomcat error 'HTTP Status 404 - /servlet/' when trying to access https://
  
  <p>New server config:</p>
  
  <pre><code>&lt;VirtualHost _default_:443&gt;
  
  ...lots of my main ssl server config stuff...
  
  Alias /servlet /opt/appserver/webapps/ROOT
  
  JkMount /servlet/* ajp13
  
  &lt;Directory /opt/appserver/webapps/ROOT&gt;
          AllowOverride None
          Options FollowSymLinks
          Order allow,deny
          allow from all
          DirectoryIndex index_page.jsp
  &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>