Your first message went through. Tomcat can do exactly what you need. It can be
configured to run several vhosts, each as their own application. Normally you
give each vhost its own Tomcat instance, to provide a clean separation of
runtime enviroments between sites. It also gives you the ability to restart one
Tomcat instance without having to bring them all down (at least, with ajp12). I
believe that you can also run them all under one Tomcat instance. I have done
this before with Tomcat standalone, I assume it also works connected to Apache,
but I recommend going the separate VM route if you are running vhosts.

I recommend the latest version of Apache (currently 1.3.19) and Tomcat 3.2.1. I
think 3.2.2 will be out in the next couple of weeks, it would be a good choice
as well. You should use mod_jk, and not mod_jserv. I recommend getting both the
binary and source versions of 3.2.1. Use the binary version for Tomcat itself,
and use the source version just for compiling mod_jk. Configuring
Apache+Tomcat+mod_jk+vhosts is not a trivial task for sure, and there's not a
concise resource for setting it all up. The documentation that comes with
Tomcat has a lot of information, but the pieces you need are spread across
several documents. Be sure to read the mod_jk howto, as well as the workers
howto.

As far as configuration goes, don't use the automatically generated config
files - they aren't going to have what you want for vhosts. Just create them
from scratch. With the aforementioned setup, the important config files are
server.xml, workers.properties, uriworkermap.properties, and mod_jk.conf. A few
other files (web.xml, web.dtd, tomcat-users.xml, tomcat.policy) are also
important, just not usually for initial setup. When you find the section in the
documentation that talks about creating a separate server.xml file for each
vhost, you are looking in the right place. In order to do separate VM's that is
the route you need to go. Also, watch out for the dreaded CPU loop, which is
easy to do with virtual hosts. See the 3.2.1 release notes, section 6.11 for
that. I've had some interesting experiences with that issue in the past couple
of days, and I'm going to make a separate post to the group with some insights
I haven't seen posted yet.

Tomcat is well suited for what you want to do, but I can assure you it's going
to take a couple of hours minimum figuring out how to configure it the way you
want it. So grab your favorite drink and have a seat. If you encounter any
snags along the way (which you will) mail to the group or to me personally,
preferably to the group. I will respond either way. :) (now that I have caught
up on my 1500 message backlog, ugh) Good luck!

-Scott

--
Scott Tatum | [EMAIL PROTECTED]
Senior Applications Developer, Special Projects
WorldCom | http://www.wcom.com/

Brandon Cruz wrote:

> I sent a message a while ago, but don't think it went though.  Basically, I
> am using Tomcat as a servlet/jsp engine for a site that uses Apache as the
> webserver.  Only problem is that I am on one server with several virtual
> host directories.  I want to be able to put .jsp files into each vhost
> directory.  Has anyone done anything like this with either tomcat or some
> other product that can plug into apache and serve jsp's and servlets?  Any
> help or tips would be greatly appreciated!!!
>
> Thanks!
>
> Brandon




Reply via email to