You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rain Man <cm...@hotmail.com> on 2011/08/30 16:06:14 UTC

Default App when virtual host under Tomcat 7.0.20





I'm trying to have virtual hosts in Tomcat 7.0.20 with a default app WITHOUT renaming everything ROOT AND WITHOUT using Apache http server in front Steps done so far put fake domain in windows host file 127.0.0.1 fakedomain.com Started Tomcat and logged into Host Manager. Add virtual host. Name : fakedomain.com Aliasas : www.fakedomain.com App base: fakedomain Yes to all settings At this point tomcat creates the app directory and conf directory and setups the manager app for the fake domain. I copy a WAR file 'Animotest-1.war' to the fakedomain app directory. I can now access my app usinghttp://fakedomain.com/Animotest-1/. Small victory :) Now I'm trying to set it as my default app My understanding is that I need to put a ROOT.xml file in the conf/Catalina/fakedomain.com directory with some variation of the following content. I'm sure my problem is here somewhere.<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:\Java\apache-tomcat-7.0.20\fakedomain\Animotest-1">
</Context>
  The resulting behavior is that tomcat now shows me the ROOT page that comes with with Tomcat not my virtual host app and my app is now 404. I also tried it via the server.xml file by adding the following in the engine section      </Host>
    <Host name="fakedomain.com" appBase="fakedomain" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
   </Host> InfoWindows 7 64 bitSun JVM 64 bit 1.60._25  Thanks 		 	   		   		 	   		  

RE: Default App when virtual host under Tomcat 7.0.20

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rain Man [mailto:cmssearch@hotmail.com] 
> Subject: Default App when virtual host under Tomcat 7.0.20

> I'm trying to have virtual hosts in Tomcat 7.0.20 with a default app 
> WITHOUT renaming everything ROOT

Not sure why you want to do things the hard way, but so be it.

You need to place the Animotest-1.war in a location outside of the <Host> appBase directory so that Tomcat won't find it via auto-deployment.  Put the full path in the <Context> docBase attribute (as you have done - just needs to be in a location outside of Tomcat's directory structure).  Make sure there is no ROOT directory or ROOT.war file under the <Host> appBase, and erase Tomcat's work directory to make sure there's nothing confusing in there left over from previous deployments.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org