<Home appBase="/home/vhost1/public_html/webapps/"...> ... <Home appBase="/home/vhost2/public_html/webapps/"...> - setting the docBase/path attributes in the child <Context> tag to some directory within the appBase path: <Home appBase="/home/vhost1/public_html/webapps/"...> <Context docBase="app1" path="/app1"...> ... <Home appBase="/home/vhost2/public_html/webapps/"...> <Context docBase="app1" path="/app1"...>
I'm assuming you mean "Host" instead of "Home".
My questions: 1: Would the aforementioned configuration properly serve JSPs/Servlets from locations beneath vhost1 and vhost2's home directories?
Yes.
2: What exactly do the docBase and path attributes define within the Context tag? What is the distinction?
Path = URL. docBase = webapp root. If you have a virtual host www.domain.com, and path = "/demo" with a docBase of "demo", then the webapp called "demo" will be reached by:
http://www.domain.com/demo
and the webapp will be located at appBase/demo.
3: It is possible to have a single worker handle requests for more than one web application belonging to more than one virtual host/user. How beneficial would it be to have a single worker handle requests sent to it from Apache for more than one virtual host? Would it be more efficient to have one worker for each virtual host and have a load balancing worker to manage those subordinate workers?
Yes. Mostly. No...load balancing is typically for multiple Tomcat instances. If you have just one, stick with one worker. I run several dozen virtual hosts, each with several Contexts (webapps) and have no problems whatsoever with one worker under significant load.
4: What sort of mechanisms to workers use to handle requests? Does a worker receive a request, fork(), child process handles the request, communicates with the Tomcat JVM, and returns the result to the requesting client, while the parent simply sits and listens for more connections? If this is the case, would a load balancer really serve to benefit anything if all this is taking place on a single machine, given that all the workers would be of type ajp13?
If a single Tomcat instance, no. If multiple Tomcat instances, possibly, but the only definite answer is "test and see for yourself" since everyone's configuration is different. From my experience, one worker and a single instance of Tomcat 4.1.x is just fine. If I went to multiple instances of Tomcat, I would use separate machines.
I'm trying to achieve and optimal, secure configuration. One that would allow the users to manage their own web applications within their home directories so I don't have to open up rwx access to the world beneath the $TOMCAT_HOME directory. Granted, I'll still have to amend server.xml to insert new contexts for users adding new WARs, but this is trivial. I've read a number of articles and even the manual describing configuration options, etc., but it seems that there are just a few points missing that would really put things into perspective for me, so I'm sending these, probably simple, questions to the list, as my last resort. Any information or links would be greatly appreciated, and hopefully I'll be able to get everything organized efficiently and securely.
If you train your users to use Tomcat's manager application (and ideally ant) then you won't ever have to do anything...they can deploy, stop, start, and restart their web applications as they wish, without your intervention, the only thing you would have to manage is the tomcat-users.xml file to give them the appropriate access permissions and the Host nodes in server.xml. Contexts (webapps) can be autodeployed.
HTH
John
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]