Conway, see inline comments below:

> -----Original Message-----
> From: Conway Liu [mailto:c...@xtra.co.nz]
> Sent: Thursday, February 03, 2011 1:11 AM
> To: users@tomcat.apache.org
> Subject: Tomcat Service configuration for running sites
> 
> Hi,
> 
> Thanks to all who answered my previous post regarding running Tomcat
> with IIS7.
> 
> I am still quite confused about the whole thing, so I think I should
> try to
> forget about IIS for the time being, and concentrate first on how to
> get Tomcat
> service to serve a java website sitting physically outside of Tomcat's
> installed
> folder.
> 
> BTW, platform is Windows 2008 R2 64bit.
> Tomcat installed is 5.5.32. (In my previous question I installed 6.0.30
> but I
> now realised when the website was running on Linux, my manager was
> using 5.5.23
> and now I can only find 5.5.32 to download. I hope it makes no
> difference).
> 

With this platform, you need to be very careful.  If you run with the native 
libraries (APR), and you are using IPv4 addresses, you will need to specify the 
"address=" attribute in all your <Connector> 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.

> 
> For example, Tomcat service is installed on: (... means some more sub
> folders or
> files within):
> C:\Tomcat\
> 
> And the subfolders under this folder are:
> C:\tomcat\bin\...   (contains tomcat5.exe, tomcat5w.exe, and 3 .jar
> files)
> C:\tomcat\common\...
> C:\tomcat\conf\...   (contains catalina.policy, catalina.properties,
> context.xml, logging.properties, server.xml, server-minimal.xml,
> tomcat-users.xml, web.xml)
> C:\Tomcat\conf\Catalina\
> C:\Tomcat\conf\Catalina\localhost
> C:\tomcat\logs
> C:\tomcat\server
> C:\Tomcat\server\classes\
> C:\Tomcat\server\lib\...   (many .jar files in there, e.g.
> catalina.jar)
> C:\Tomcat\server\webapps\...
> C:\tomcat\shared\...
> C:\tomcat\temp
> C:\tomcat\webapps\ROOT\...
> C:\tomcat\work
> 
> My Java web application is placed in:
> C:\WebApp1\
> 
> With subfolders:
> C:\WebApp1\bin\...   (contains tomcat5.exe and tomcat5w.exe and many
> .sh and
> .bat files as we previously start this site using the startup.bat
> before I
> installed the Tomcat service)
> C:\WebApp1\common\...
> C:\WebApp1\conf\...   (contains catalina.policy, catalina.properties,
> context.xml, logging.properties, server.xml, server-minimal.xml,
> tomcat-users.xml, web.xml specifically used by this website)
> C:\WebApp1\conf\Catalina\
> C:\WebApp1\logs\
> C:\WebApp1\server\
> C:\WebApp1\server\lib\...   (many .jar files in there, e.g.
> catalina.jar)
> C:\WebApp1\shared\...
> C:\WebApp1\sslcerts\...   (SSL certificates in here)
> C:\WebApp1\webapps\ROOT\...   (This is the root of the website. E.g.
> default.jsp
> sits in here)
> C:\WebApp1\webapps\ROOT\WEB-INF\classes\...   (The java classes we
> created to be
> used for the website to interact with back-end database)
> C:\WebApp1\webapps\ROOT\WEB-INF\lib\...   (some 3rd party .jar files
> specifically used by this website)
> C:\WebApp1\webapps\ROOT\WEB-INF\web.xml   (contains the listener
> definition,
> points to the listener class, so that when this site starts the
> listener class
> can perform some initialisation tasks)
> C:\WebApp1\work
> 


You don't need to duplicate the entire Tomcat structure for your webapp.  Get 
rid of everything else in C:\WebApp1 except the ROOT and sslcerts directory.  
Then configure everything else in the C:\Tomcat directory structure, 
particularly the server.xml file.  Change the ROOT.xml file to point to 
C:\WebApp1\ROOT and you should be fine.

Of course, re-reading the Tomcat documentation is highly suggested, as a number 
of your base assumptions are incorrect.

> 
> Question:
> 1. How should I configure Tomcat service so that it serves the WebApp1
> website?
> Which file in which folder to modify?
> 2. When Tomcat starts WebApp1 website, which set of configuration files
> is it
> using? (Those in C:\tomcat\conf\ or those in C:\WebApp1\conf\?)
> 3. If I am to add another website to the same server, say C:\WebApp2,
> with exact
> folder structure as WebApp1, how should I configure Tomcat service so
> that it
> serves both WebApp1 and WebApp2?
> 4. The two sites will use different IP addresses. For example WebApp1
> is
> 43.88.12.123, and WebApp2 is 43.88.12.133. How do I tell Tomcat which
> IP belongs
> to which website?
> 
> 
> Again, your input is very much appreciated.
> 
> Best regards
> Conway
__________________________________________________________________________

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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

Reply via email to