title: How to setup a tomcat virtualhost without webapps?
body: <p>I am trying to migrate my webapp from resin to Tomcat7 . One thing confuses me is I don't know how to setup a 'default' webapp for one virtual host ? </p>
  
  <p>That is , my site has just one app : <code>"/"</code> , located in "<code>/home/destiny/www</code>" . There are many PHP scripts inside (served by apache) , and one WEB-INF directory inside , with a standard JavaEE app.  <code>My app is not packaged in WAR , it is default expanded</code>.</p>
  
  <p>I try to find documents about how to setup a virtual host in tomcat 7 , but all examples need a 'webapps' directory for WARs to expand , but that's not my case !</p>
  
  <p>Here is my server.xml settings (tomcat 7.0.23 ) :</p>
  
  <pre><code>&lt;Host name="myhost.com" xmlBase="/home/destiny/www" 
    unpackWARS="false" autoDeploy="true"&gt;
    &lt;Context path="/" docBase="." /&gt;
  &lt;/Host&gt;
  
  &lt;!-- default tomcat's host --&gt;
  &lt;Host name="localhost"  appBase="webapps"
    unpackWARs="true" autoDeploy="true"&gt; ... &lt;/Host&gt;
  </code></pre>
  
  <p>When I start tomcat , I see my webapp not loaded , only tomcat's webapps (host-manager , manager , examples , docs , ROOT ...) loaded. When I open my site , it shows tomcat's default screen (with broken images).</p>
  
  <p>The configuration is not working... ( I tried xmlBase , appBase , docBase ... but all in invain)</p>
  
  <p>It seems one solution is a webapp named '<code>ROOT</code>' in <code>/home/destiny/www/webapps/ROOT</code> directory , but I don't want that solution ! I want my default web app in /home/destiny/www . and there'll be no other webapps installed (I don't need a <code>webapps</code> dir ).</p>
  
  <p>How to solve it (It's so easy to achieve in resin) ? Thanks.</p>