Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7722AE367 for ; Wed, 6 Feb 2013 11:20:58 +0000 (UTC) Received: (qmail 15322 invoked by uid 500); 6 Feb 2013 11:20:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 15136 invoked by uid 500); 6 Feb 2013 11:20:54 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 15105 invoked by uid 99); 6 Feb 2013 11:20:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 11:20:53 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [155.136.80.33] (HELO remacdmzma03.rbs.com) (155.136.80.33) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 11:20:44 +0000 X-GBM: True X-IronPort-AV: E=Sophos;i="4.84,614,1355097600"; d="scan'208";a="24284747" Received: from unknown (HELO lonix02001.fm.rbsgrp.net) ([147.114.197.154]) by remacdmzma03.rbs.com with ESMTP; 06 Feb 2013 11:20:23 +0000 X-IronPort-AV: E=Sophos;i="4.84,615,1355097600"; d="scan'208";a="1976655516" X-RBS-Disclaimer: True Received: from lonms01573.rbsres07.net ([172.26.102.171]) by lonix02001.fm.rbsgrp.net with ESMTP; 06 Feb 2013 11:20:20 +0000 Received: from LONMC01010.rbsres07.net ([11.160.90.118]) by lonms01573.rbsres07.net ([172.26.102.171]) with mapi; Wed, 6 Feb 2013 11:20:19 +0000 From: To: , Date: Wed, 6 Feb 2013 11:20:16 +0000 Subject: RE: Tomcat Thread-Topic: Tomcat Thread-Index: Ac4EWDlCnVEaeHKtT26lv0Z5GerN3AAAyygQ Message-ID: <20772781D66D884CBAFFABECDC5A9A8D3BBE9483DA@LONMC01010.rbsres07.net> References: <20772781D66D884CBAFFABECDC5A9A8D3BBE83FD65@LONMC01010.rbsres07.net> <51122989.4030801@ice-sa.com> <20772781D66D884CBAFFABECDC5A9A8D3BBE83FE87@LONMC01010.rbsres07.net> <51123595.4050908@ice-sa.com> In-Reply-To: <51123595.4050908@ice-sa.com> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org =20 Hi Thanks for all the help and I know it may sound lame but I am trying to lea= rn 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 dif= ferent environment. If this is possible how can we accomplish this. Thanks in advance for the help and sorry for bugging the group with such si= lly questions. MOHIT GARG Analyst=20 International Banking RBS Block No 1, Tower A, Unitech Infospace Complex Sector 21, Gurgaon, Haryana,= 122002, India Office: +91 8860190177 =20 -----Original Message----- From: Andr=E9 Warnier [mailto:aw@ice-sa.com]=20 Sent: 06 February 2013 16:21 To: Tomcat Users List Subject: Re: Tomcat Mohit.Garg@rbs.com wrote: > Hi > =20 > Regrets for the wrong framing of question. > Actually I am new to tomcat and what I really want to do is run on the sa= me server two different tomcats so that one doesn't interfere with the work= ing 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 v= ice-versa. That's why I want to have a separate tomcat process for each hos= t. > If I just change the port in the config file the request will be mapped b= ut the various environments will have access to all the files as it will be= present in the common directory. >=20 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 real= ly want to separate. First, a note : considering that you are on a Linux machine, it is highly p= ossible that you have installed Tomcat using a pre-packaged version from yo= ur Linux distribution. These packages work fine and are easy to install for a normal single-instan= ce case, but they make it more difficult for doing the kind of thing that y= ou want to do, and more difficult for people on this list to help you. Tha= t is because each of these packages distributes the files of Tomcat in diff= erent places on the disk, sets different environment variables, sets differ= ents links from one directory to the other in the filesystem, etc.. So it would be better to install a "standard" tomcat downloaded from the we= bsite "tomcat.apache.org", to some directory like /opt/tomcat, and follow t= he 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 ide= a of where things are. (You can also leave your current Tomcat where it is, and consider it as you= r "production"=20 tomcat, and download and install another copy to another directory as your = "development"=20 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 no= t to mix the production and the development environments. That's establishe= d. 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 d= irectories in /opt (such as /opt/tomcat-prod and /opt/tomcat-dev for instan= ce). If not, then one single copy of tomcat will be enough, and you can configur= e things to still run 2 different "instances" of tomcat, from one single co= py 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. un= der CATALINA_HOME, Tomcat expects to find for example it's "bin" subdirecto= ry, 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 direct= ory (so they will run the same Tomcat code from $CATALINA_HOME/bin), but ha= ve different $CATALINA_BASE directories (so they will use a different confi= guration from $CATALINA_BASE/conf, different webapps from $CATALINA_BASE/we= bapps 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 : h= ttp://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html). The hostnames will be different, and the webapps will be completely separat= e. But there will still be one single instance of tomcat running, and ther= e /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 th= e other e.g.). --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org ***************************************************************************= ********=20 The Royal Bank of Scotland plc. Registered in Scotland No 90312.=20 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.=20 Authorised and regulated by the Financial Services Authority. The=20 Royal Bank of Scotland N.V. is authorised and regulated by the=20 De Nederlandsche Bank and has its seat at Amsterdam, the=20 Netherlands, and is registered in the Commercial Register under=20 number 33002587. Registered Office: Gustav Mahlerlaan 350,=20 Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and=20 The Royal Bank of Scotland plc are authorised to act as agent for each=20 other in certain jurisdictions.=20 =20 This e-mail message is confidential and for use by the addressee only.=20 If the message is received by anyone other than the addressee, please=20 return the message to the sender by replying to it and then delete the=20 message from your computer. Internet e-mails are not necessarily=20 secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland=20 N.V. including its affiliates ("RBS group") does not accept responsibility=20 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).=20 Whilst all reasonable care has been taken to avoid the transmission of=20 viruses, it is the responsibility of the recipient to ensure that the onwar= d=20 transmission, opening or use of this message and any attachments will=20 not adversely affect its systems or data. No responsibility is accepted=20 by the RBS group in this regard and the recipient should carry out such=20 virus and other checks as it considers appropriate.=20 Visit our website at www.rbs.com=20 ***************************************************************************= ******** =20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org