tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: How to start my application without localhost, only with virtiual host ?
Date Wed, 27 Oct 2010 15:44:34 GMT
> From: M.Arkhypov [mailto:Mykhaylo.Arkhypov@gmx.net] 
> Subject: How to start my application without localhost, only with virtiual host ?

> I would like to start my application without localhost,
> only with virtiual host.

All <Host> elements are virtual.  The name "localhost" in the <Engine> and one
<Host> element has nothing to do with 127.0.0.1, but rather it simply links the <Engine>
to the default <Host>.  You must always have one default <Host>, but it can be
any of your <Host> elements.

> <Host name="mmmtest.ch"
>       unpackWARs="true" autoDeploy="true"
>       xmlValidation="false" xmlNamespaceAware="true">
>   <Alias>mmmtest.ch</Alias>

You're missing the appBase attribute; the value for that should be unique for each <Host>.

That's a pointless <Alias>, since it's the same as the name attribute.

>   <Context path=""
>            docBase="c:/temp_mmm/apache-tomcat-6.0.29/webapps/examples"
>            reloadable="true" allowLinking="true" >
>   </Context>

It's extremely bad practice to put <Context> elements in server.xml, and very dangerous
to share webapps across multiple <Host> elements.

> The tomcatmanager is reachable on: 
> http://mmmtest.ch:8080/manager/html.

Only because both <Host> elements are sharing appBase - a really bad idea.

> <Host name="pcd-testcommunity.de"
>       unpackWARs="true" autoDeploy="true"
>       xmlValidation="false" xmlNamespaceAware="true">
>   <Alias>pcd-testcommunity.de</Alias>

Another useless <Alias>.

> <Context path=""
>          docBase="/var/lib/tomcat55/webapps/CompetenceNetwork"
>          reloadable="true" allowLinking="true" >
> </Context>

Another undesirable location for a <Context> element.  The webapp should be renamed
to ROOT, and the <Context> element placed in /var/lib/tomcat55/webapps/ROOT/META-INF/context.xml,
and the path attribute removed.

> How can I work with tomcatmanager with these configurations?

You must place a copy of the manager webapp in each <Host>'s appBase directory.

 - 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


Mime
View raw message