Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 59795 invoked from network); 4 Feb 2011 15:07:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2011 15:07:18 -0000 Received: (qmail 7792 invoked by uid 500); 4 Feb 2011 15:07:14 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 7619 invoked by uid 500); 4 Feb 2011 15:07:10 -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 7609 invoked by uid 99); 4 Feb 2011 15:07:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 15:07:09 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.219.55.137] (HELO mail.polydyne.com) (66.219.55.137) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 15:07:01 +0000 Received: from Unknown [10.1.1.19] by mail.polydyne.com - Websense Email Security (7.2.0); Fri, 04 Feb 2011 09:08:31 -0600 Received: from POSTOFFICE02.polydyne.com ([::1]) by POSTOFFICE02.polydyne.com ([::1]) with mapi id 14.01.0270.001; Fri, 4 Feb 2011 09:06:34 -0600 From: Jeffrey Janner To: 'Tomcat Users List' Subject: RE: Tomcat Service configuration for running sites Thread-Topic: Tomcat Service configuration for running sites Thread-Index: AQHLw3GgimLJnrqfK0uapLDhkilVRJPxcNuQ Date: Fri, 4 Feb 2011 15:06:32 +0000 Message-ID: <7215BA462D00D343B2837F9113F0131F06C909@POSTOFFICE02.polydyne.com> References: <823977.33661.qm@web96110.mail.aue.yahoo.com> In-Reply-To: <823977.33661.qm@web96110.mail.aue.yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.1.27] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SEF-7853D99-ADF1-478E-8894-213D316B8FFA: 1 X-SEF-Processed: 7_2_0_00493__2011_02_04_09_08_32 X-Virus-Checked: Checked by ClamAV on apache.org Conway, see inline comments below:=0D=0A=0D=0A> -----Original Message-----=0D= =0A> From: Conway Liu [mailto:cliu@xtra.co.nz]=0D=0A> Sent: Thursday, Febru= ary 03, 2011 1:11 AM=0D=0A> To: users@tomcat.apache.org=0D=0A> Subject: Tom= cat Service configuration for running sites=0D=0A>=20=0D=0A> Hi,=0D=0A>=20=0D= =0A> Thanks to all who answered my previous post regarding running Tomcat=0D= =0A> with IIS7.=0D=0A>=20=0D=0A> I am still quite confused about the whole = thing, so I think I should=0D=0A> try to=0D=0A> forget about IIS for the ti= me being, and concentrate first on how to=0D=0A> get Tomcat=0D=0A> service = to serve a java website sitting physically outside of Tomcat's=0D=0A> insta= lled=0D=0A> folder.=0D=0A>=20=0D=0A> BTW, platform is Windows 2008 R2 64bit= =2E=0D=0A> Tomcat installed is 5.5.32. (In my previous question I installed= 6.0.30=0D=0A> but I=0D=0A> now realised when the website was running on Li= nux, my manager was=0D=0A> using 5.5.23=0D=0A> and now I can only find 5.5.= 32 to download. I hope it makes no=0D=0A> difference).=0D=0A>=20=0D=0A=0D=0A= With this platform, you need to be very careful. If you run with the nativ= e libraries (APR), and you are using IPv4 addresses, you will need to speci= fy the "address=3D" attribute in all your tags in server.xml. = You'd need to do that anyway if running multiple instances, but you have to= even for a single Tomcat instance on that platform.=0D=0A=0D=0A>=20=0D=0A>= For example, Tomcat service is installed on: (... means some more sub=0D=0A= > folders or=0D=0A> files within):=0D=0A> C:\Tomcat\=0D=0A>=20=0D=0A> And t= he subfolders under this folder are:=0D=0A> C:\tomcat\bin\...=A0=A0 (contai= ns tomcat5.exe, tomcat5w.exe, and 3 .jar=0D=0A> files)=0D=0A> C:\tomcat\com= mon\...=0D=0A> C:\tomcat\conf\...=A0=A0 (contains catalina.policy, catalina= =2Eproperties,=0D=0A> context.xml, logging.properties, server.xml, server-m= inimal.xml,=0D=0A> tomcat-users.xml, web.xml)=0D=0A> C:\Tomcat\conf\Catalin= a\=0D=0A> C:\Tomcat\conf\Catalina\localhost=0D=0A> C:\tomcat\logs=0D=0A> C:= \tomcat\server=0D=0A> C:\Tomcat\server\classes\=0D=0A> C:\Tomcat\server\lib= \...=A0=A0 (many .jar files in there, e.g.=0D=0A> catalina.jar)=0D=0A> C:\T= omcat\server\webapps\...=0D=0A> C:\tomcat\shared\...=0D=0A> C:\tomcat\temp=0D= =0A> C:\tomcat\webapps\ROOT\...=0D=0A> C:\tomcat\work=0D=0A>=20=0D=0A> My J= ava web application is placed in:=0D=0A> C:\WebApp1\=0D=0A>=20=0D=0A> With = subfolders:=0D=0A> C:\WebApp1\bin\...=A0=A0 (contains tomcat5.exe and tomca= t5w.exe and many=0D=0A> .sh and=0D=0A> .bat files as we previously start th= is site using the startup.bat=0D=0A> before I=0D=0A> installed the Tomcat s= ervice)=0D=0A> C:\WebApp1\common\...=0D=0A> C:\WebApp1\conf\...=A0=A0 (cont= ains catalina.policy, catalina.properties,=0D=0A> context.xml, logging.prop= erties, server.xml, server-minimal.xml,=0D=0A> tomcat-users.xml, web.xml sp= ecifically used by this website)=0D=0A> C:\WebApp1\conf\Catalina\=0D=0A> C:= \WebApp1\logs\=0D=0A> C:\WebApp1\server\=0D=0A> C:\WebApp1\server\lib\...=A0= =A0 (many .jar files in there, e.g.=0D=0A> catalina.jar)=0D=0A> C:\WebApp1\= shared\...=0D=0A> C:\WebApp1\sslcerts\...=A0=A0 (SSL certificates in here)=0D= =0A> C:\WebApp1\webapps\ROOT\...=A0=A0 (This is the root of the website. E.= g.=0D=0A> default.jsp=0D=0A> sits in here)=0D=0A> C:\WebApp1\webapps\ROOT\W= EB-INF\classes\...=A0=A0 (The java classes we=0D=0A> created to be=0D=0A> u= sed for the website to interact with back-end database)=0D=0A> C:\WebApp1\w= ebapps\ROOT\WEB-INF\lib\...=A0=A0 (some 3rd party .jar files=0D=0A> specifi= cally used by this website)=0D=0A> C:\WebApp1\webapps\ROOT\WEB-INF\web.xml=A0= =A0 (contains the listener=0D=0A> definition,=0D=0A> points to the listener= class, so that when this site starts the=0D=0A> listener class=0D=0A> can = perform some initialisation tasks)=0D=0A> C:\WebApp1\work=0D=0A>=20=0D=0A=0D= =0A=0D=0AYou don't need to duplicate the entire Tomcat structure for your w= ebapp. Get rid of everything else in C:\WebApp1 except the ROOT and sslcer= ts directory. Then configure everything else in the C:\Tomcat directory st= ructure, particularly the server.xml file. Change the ROOT.xml file to poi= nt to C:\WebApp1\ROOT and you should be fine.=0D=0A=0D=0AOf course, re-read= ing the Tomcat documentation is highly suggested, as a number of your base = assumptions are incorrect.=0D=0A=0D=0A>=20=0D=0A> Question:=0D=0A> 1. How s= hould I configure Tomcat service so that it serves the WebApp1=0D=0A> websi= te=3F=0D=0A> Which file in which folder to modify=3F=0D=0A> 2. When Tomcat = starts WebApp1 website, which set of configuration files=0D=0A> is it=0D=0A= > using=3F (Those in C:\tomcat\conf\ or those in C:\WebApp1\conf\=3F)=0D=0A= > 3. If I am to add another website to the same server, say C:\WebApp2,=0D=0A= > with exact=0D=0A> folder structure as WebApp1, how should I configure Tom= cat service so=0D=0A> that it=0D=0A> serves both WebApp1 and WebApp2=3F=0D=0A= > 4. The two sites will use different IP addresses. For example WebApp1=0D=0A= > is=0D=0A> 43.88.12.123, and WebApp2 is 43.88.12.133. How do I tell Tomcat= which=0D=0A> IP belongs=0D=0A> to which website=3F=0D=0A>=20=0D=0A>=20=0D=0A= > Again, your input is very much appreciated.=0D=0A>=20=0D=0A> Best regards=0D= =0A> Conway=0D=0A=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=0D=0A=0D=0AConfidentiality Notice: This Transmission (includi= ng any attachments) may contain information that is privileged, confidentia= l, and exempt from disclosure under applicable law. If the reader of this = message is not the intended recipient you are hereby notified that any diss= emination, distribution, or copying of this communication is strictly prohi= bited. =20=0D=0A=0D=0AIf you have received this transmission in error, plea= se immediately reply to the sender or telephone (512) 343-9100 and delete t= his transmission from your system.=0D=0A --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org