tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: How to have multiple domains/contexts with Tomcat ? they all go to same context ..
Date Fri, 26 Sep 2008 19:22:03 GMT

----- Original Message ----- 
From: "André Warnier" <>
To: "Tomcat Users List" <>
Sent: Friday, September 26, 2008 12:10 PM
Subject: Re: How to have multiple domains/contexts with Tomcat ? they all go 
to same context ..

> Can you tell us on what kind of host system you are running this ?
> It would help guessing where the files are.
> Thanks.
> P.S.
> I am not the expert, but it should indeed be relatively simple, so I'll 
> try. In a nutshell :
> - start again from the original "server.xml" file.
> - in it, locate the <Host name="localhost" ..>...</Host> section, copy it,

> and re-insert it after the original section.
> - then replace the name="localhost" attribute by name=""
> - then redo the same one more time, this time with ""
> The above takes care of letting Tomcat known that there are 3 Virtual 
> Hosts :
> -
> -
> - and localhost, which will also be (remain) the Host by default, if the 
> name given in the request does not match either of the other ones (for 
> example, if someone calls up (with the IP 
> address of your server). (I suggest to keep that one as it is, to access 
> the documentation etc..)
> Now what is left is to tell Tomcat where, for each of the virtual hosts, 
> he finds the corresponding documents and webapps.
> I would recommend to create 2 additional directories, at the same level as 
> your current "webapps", say "webapps-pink" and "webapps-blue".
> Then move the respective documents/applications in these directories, 
> checking ownership and permissions etc.. They must at least be readable by 
> the user-id running Tomcat.
> Now go back to your individual Hosts sections, and change 
> appBase="webapps" by  appBase="webapps-pink" and appBase="webapps-blue"
> Now restart Tomcat.
> You should now be able to access "blue" by calling up 
> "".
> To make this trailing /mrblue go away, you should make this webapp into 
> the ROOT webapp for that virtual server, but for that I'll let an expert 
> give you the instructions.
> Have I got it right ?

Any better... and we'll have to pay you a consulting fee ;)

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message