I was having a similar problem moving a Tomcat 5.5 configuration to 6.0.

Following this thread and reading the docs I created virtual hosts
using the same webapps dir (it is a development environment with CVS
and I would have to change many things to accomplish one webapp folder
per virtual host).

Using the examples on this thread it would be like this

<Host name="localhost"  appBase="webapps"
     unpackWARs="true" autoDeploy="false" deployOnStartup="false"
     xmlValidation="false" xmlNamespaceAware="false">
     </Host>

<Host name="foo"  appBase="webapps"
     unpackWARs="true" autoDeploy="false" deployOnStartup="false"
     xmlValidation="false" xmlNamespaceAware="false">

<Context path="" docBase="foo" reloadable="true" />

</Host>

<Host name="bar"  appBase="webapps"
     unpackWARs="true" autoDeploy="false" deployOnStartup="false"
     xmlValidation="false" xmlNamespaceAware="false">

    <Context path="" docBase="bar" reloadable="true" />
</Host>

with this I avoid full apps initialization on Tomcat Startup (I have
up to 20 and use <!-- --> to comment the Host I am not workin on) and
I am able to treat each app under webapps as an independent host.

I suppose it is not a good set-up for a production environment but I
needed a quick set-up to start working ASAP and this seems to work
just fine.

On Wed, May 5, 2010 at 10:57 AM, André Warnier <a...@ice-sa.com> wrote:
> That was a nice and concise write-up, well-worth of an article in the Tomcat
> FAQ/WIKI.
> "How to setup Tomcat with 3 virtual hosts, each with its own homepage and
> Manager (and other) applications, and its own logfiles".
>
> My only minor remark :
>
> Mark Eggers wrote:
> ...
>>
>> Finally for my setup, I added 127.0.0.1 foo and 127.0.0.1 bar to my hosts
>> file in WINNT\system32\drivers\etc (this is an upgraded Windows/2000
>> Professional machine).
>>
>> Upon starting up this mess, /***/ all three hosts were visible at
>> localhost:8080, foo:8080, and bar:8080 as you would expect.
>>
> At the /***/, I would insert "from a browser running on the same machine".
> Nothing to do with Tomcat really, but there are still quite a number of
> people out there confused by hostname lookup and IP routing stuff.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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

Reply via email to