tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Tomcat
Date Wed, 06 Feb 2013 11:20:16 GMT
Thanks for all the help and I know it may sound lame but I am trying to learn these things.
Although I have one more doubt.
If we have multiple tomcat for multiple environment on the single Unix box(machine)
Now Single Apache daemon is running for multiple environment. So can we run multiple instance
of Apache daemon in the same machine or not for each different environment.
If this is possible how can we accomplish this.

Thanks in advance for the help and sorry for bugging the group with such silly questions.

International Banking
Block No 1, Tower A, Unitech Infospace Complex Sector 21, Gurgaon, Haryana, 122002, India
Office: +91 8860190177   

-----Original Message-----
From: André Warnier [] 
Sent: 06 February 2013 16:21
To: Tomcat Users List
Subject: Re: Tomcat wrote:
> Hi
> Regrets for the wrong framing of question.
> Actually I am new to tomcat and what I really want to do is run on the same server two
different tomcats so that one doesn't interfere with the working of the other.
> As I have different environments so I want that the tomcat running in my development
environment do not access the files of my SIT environment and vice-versa. That's why I want
to have a separate tomcat process for each host.
> If I just change the port in the config file the request will be mapped but the various
environments will have access to all the files as it will be present in the common directory.

Ah, that's better.
So we forget about Apache httpd, right ?
So, assuming that you are talking about tomcat only :

There are (many) different levels of separation, depending on what you really want to separate.

First, a note : considering that you are on a Linux machine, it is highly possible that you
have installed Tomcat using a pre-packaged version from your Linux distribution.
These packages work fine and are easy to install for a normal single-instance case, but they
make it more difficult for doing the kind of thing that you want to do, and more difficult
for people on this list to help you.  That is because each of these packages distributes the
files of Tomcat in different places on the disk, sets different environment variables, sets
differents links from one directory to the other in the filesystem, etc..
So it would be better to install a "standard" tomcat downloaded from the website "",
to some directory like /opt/tomcat, and follow the instructions that are given in the "RUNNING.txt"
file at the top of this distribution.
This way, everyone here knows what you are talking about and has a good idea of where things
(You can also leave your current Tomcat where it is, and consider it as your "production"

tomcat, and download and install another copy to another directory as your "development" 
tomcat. Then we can maybe help you set up this development tomcat in a way that does not conflict
with the other one).

Then, the next question is : you want to run 2 "separate" tomcats, so as not to mix the production
and the development environments. That's established.
But do you want also to be able to run 2 different /versions/ of Tomcat ?

If yes, you will have to download and install tomcat twice, to 2 separate directories in /opt
(such as /opt/tomcat-prod and /opt/tomcat-dev for instance).
If not, then one single copy of tomcat will be enough, and you can configure things to still
run 2 different "instances" of tomcat, from one single copy of the code.

Then, some advance information :
There are 2 environment variables which point to disk directories and which are very important
for what you want to do :

CATALINA_HOME : this tells Tomcat where its runnable *code* is located.  under CATALINA_HOME,
Tomcat expects to find for example it's "bin" subdirectory, where the main executable parts
of Tomcat are located.

CATALINA_BASE : this tells Tomcat where its instance-specific "things" are located. For example,
Tomcat will look into $CATALINA_BASE/conf to find its main configuration files.

By default, these 2 values are the same, and Tomcat will use the same /bin, /conf etc..

But you can set up 2 tomcat instances to use the same $CATALINA_HOME directory (so they will
run the same Tomcat code from $CATALINA_HOME/bin), but have different $CATALINA_BASE directories
(so they will use a different configuration from $CATALINA_BASE/conf, different webapps from
$CATALINA_BASE/webapps etc).

That's the basics for separating two tomcat instances.

Note that there is still a much easier way, using a single Tomcat instance and just 2 separate
"virtual hosts" inside the same running Tomcat (see :
The hostnames will be different, and the webapps will be completely separate.  But there will
still be one single instance of tomcat running, and there /could/ be interference between
them (not at the access level, but in the sense that one webapp could use up all the memory
and so interfere with the other e.g.).

To unsubscribe, e-mail:
For additional commands, e-mail:

The Royal Bank of Scotland plc. Registered in Scotland No 90312. 
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. 
Authorised and regulated by the Financial Services Authority. The 
Royal Bank of Scotland N.V. is authorised and regulated by the 
De Nederlandsche Bank and has its seat at Amsterdam, the 
Netherlands, and is registered in the Commercial Register under 
number 33002587. Registered Office: Gustav Mahlerlaan 350, 
Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and 
The Royal Bank of Scotland plc are authorised to act as agent for each 
other in certain jurisdictions. 
This e-mail message is confidential and for use by the addressee only. 
If the message is received by anyone other than the addressee, please 
return the message to the sender by replying to it and then delete the 
message from your computer. Internet e-mails are not necessarily 
secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland 
N.V. including its affiliates ("RBS group") does not accept responsibility 
for changes made to this message after it was sent. For the protection
of RBS group and its clients and customers, and in compliance with
regulatory requirements, the contents of both incoming and outgoing
e-mail communications, which could include proprietary information and
Non-Public Personal Information, may be read by authorised persons
within RBS group other than the intended recipient(s). 

Whilst all reasonable care has been taken to avoid the transmission of 
viruses, it is the responsibility of the recipient to ensure that the onward 
transmission, opening or use of this message and any attachments will 
not adversely affect its systems or data. No responsibility is accepted 
by the RBS group in this regard and the recipient should carry out such 
virus and other checks as it considers appropriate. 

Visit our website at 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message