"Charles N. Harvey III" a �crit :
> I have a question relating to this...
>
> We run around 6 sites each of which has a www and a java directory.
> We will be moving everything to tomcat very soon. The web servers I
> will have seperately from the tomcat servers with the ajp (mod_jk)
> connector connecting the machines.
>
> Apache has virtual hosts. And within each virtual host I will have
> a connection to the apropriate directory on the tomcat server where
> that site's classes/applications are located.
>
> What I want to be able to do though is restart one instance without
> dropping the classloader of another. Can I do that with one tomcat
> install and simply having multiple connectors in the server.xml?
> Or do I have to install tomcat multiple times? It is not a big deal
> if I have to install many times, it is not very large.
>
> Thanks for the help.
>
> Charlie
>
> > -----Original Message-----
> > From: Ion Larranaga [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 20, 2002 12:24 PM
> > To: Tomcat Users List
> > Subject: RE: Multiple Tomcat-servers on a single machine
> >
> >
> >
> > I think that you have two possibilities to do what you want:
> >
> > - You could set up one instance of Tomcat with X different contexts,
> > so that each user has his own. Servlets from different users would
> > have different physical directories, so each user would have a different
> > working directory. This way, users would access their specific servlets
> > with URLs:
> >
> > http://server/user1/servlet/yourServlet
> > http://server/user2/servlet/yourServlet
> > ...
> >
> > - But if you want the course to be more complete, including configuration
> > of Tomcat, of course you should set up different Tomcat instances for
> > one. These instances should listen on a different port, so they
> > will need
> > different configuration files (server.xml), updating the port each
> > HttpConnector listens to. This way, the URLs to access the
> > servlets would
> > be:
> >
> > http://server:8081/user1/servlet/yourServlet
> > http://server:8082/user2/servlet/yourServlet
> > ...
> >
> > Just as long as different instances do not try to listen to the same port
> > there should be no problem. If you will connect to Tomcat through
> > Apache, it
> > is
> > basically the same, but changing the port of ajp or warp connectors
> > (depending on
> > the Apache module you use)
> >
> > Hope it helps,
> >
> > Ion
> >
> >
> > -----Mensaje original-----
> > De: Anders Gunnare [mailto:[EMAIL PROTECTED]]
> > Enviado el: miercoles, 20 de febrero de 2002 17:49
> > Para: [EMAIL PROTECTED]
> > Asunto: Multiple Tomcat-servers on a single machine
> >
> >
> > Hello World,
> >
> > How shall I do if I would like to have multiple Tomcat-servers on a
> > single machine?
> >
> > I have tried to read the doc, but I can't understand how I practically
> > shall do the work...
> > For example, 5 different UNIX-users shall have 5 different
> > Tomcat-servers,
> > one user=one Tomcat-server.
> >
> > The reasons is that I shall have a Servlet-course and I have one
> > UNIX-server where we shall do our work.
> >
> > Best regards
> > Anders Gunnare
> > Frontec
> > Sweden
> >
> >
> > --
> > To unsubscribe: <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> > --
> > To unsubscribe: <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe: <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
Well, well, well...
The stuff is not so hard after all.
I have a single Apache runnin' and a single Tomcat runnin' too.
I think the best way is to make instances of Tomcat.
Yu will have one binary code runnin' and many instances, on different port
each..., easyly usefull by their own.
I mean every user will have the opportunity to start/stop his own instance
without disturbin' all the other.
If it is what yu want so lets's go.
Tomcat can be instantiated easily:
For each user let's say in their HOME dir call user_home, just create a WebApp
folder like below:
$user_home/WebApp containing
./conf
./logs
./webapps
./work
Just set the rights correctly for that user.
In the conf folder cp the $CATALINA_HOME/conf files yu need ( server.xml,
web.xml, tomcat_users.xml ...)
modify conf/server.xml to set different non-used ports for yur stuff
for instance :
<Server port="8015" shutdown="SHUTDOWN" debug="0">
../..
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8018" minProcessors="5" maxProcessors="75"
enableLookups="true" appBase="webapps"
acceptCount="10" debug="0"/>
In the bin folder create the files to start/stop the instance:
#!/bin/sh -x
# -----------------------------------------------------------------------------
# Start script for the CATALINA Server
#
# $Id: shutdown.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $
#
# V1.0 021902 Adapted for user1 by Admin on 02/19/2002
# -----------------------------------------------------------------------------
JAVA_HOME=/usr/j2se
CATALINA_HOME=/usr/local/Tomcat
CATALINA_BASE=/export/home/user1/AppWeb
export JAVA_HOME CATALINA_HOME CATALINA_BASE
BASEDIR=`dirname $0`
$CATALINA_HOME/bin/catalina.sh start "$@"
#
Make the same for stop replacing start by ... stop ! yes yu get it, boy..
Yu can modify the user_home/conf/server.xml to put logs at the right place.
Yu can also allow the manager application too!
Well i do it with an instance of Apache via mod_webapp under TC4.0.2/Warp1.0.2
without any pbs..
Hope this help.
Regards.
Jean-Luc B :O)
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>