Virtual Host in Tomcat 8
<p>I want to map a domain <code>mydomain.com</code> to an application. I added a <code>&lt;Host&gt;</code> entry into <code>server.xml</code>, but when I go to <code>www.mydomain.com</code> it shows the Tomcat start page instead of my application.</p>

<p>server.xml:</p>

<pre><code>&lt;Engine name="Catalina" defaultHost="localhost"&gt;

  &lt;Realm className="org.apache.catalina.realm.LockOutRealm"&gt;
   &lt;Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/&gt;
  &lt;/Realm&gt;

  &lt;Host name="localhost" autoDeploy="true" unpackWARs="true" appBase="webapps"&gt;
    &lt;Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%h %l %u %t "%r" %s %b" suffix=".txt" prefix="localhost_access_log" directory="logs"/&gt;
  &lt;/Host&gt;


  &lt;Host name="mydomain.com" autoDeploy="true" unpackWARs="true" appBase="webapps"&gt;
    &lt;Alias&gt;www.mydomain.com&lt;/Alias&gt;
    &lt;Context privileged="true" debug="0" docBase="/opt/tomcat/webapps/MyDomain" path=""/&gt;
    &lt;Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%h %l %u %t "%r" %s %b" suffix=".txt" prefix="localhost_access_log." directory="logs" resolveHosts="false"/&gt;
  &lt;/Host&gt;

&lt;/Engine&gt;
</code></pre>

<p>Thanks in advance!</p>