uh, sort of I guess, An easier to understand model would be;
Apache receives a request on port 80 for virtual server foo.com/cool/index.jsp Apache reads it's configuration for virtual host foo.com, finds a jkmount for /cool/*.jsp ajp13 Apache hands all further processing over to mod_jk.so, which was loaded on Apache start Mod_jk hands the request over to Tomcat for processing via a worker ajp13 Ajp13 communication port and lb factor are determined in the workers.properties file (8009) The worker processes the request then hands it back to mod_jk Mod_jk hands it back to Apache and Apache sends it on it's way. This is an over simplified top down view but you get the idea. Kind of like a bucket brigade to put out fires. To answer your other question: Apache determines what virtual host gets what. Server.xml, among other things, determines what directory structure to follow to process a webapp, say examples2, where to log it, etc, etc. (See the examples context in TOMCAT_HOME\conf\server.xml. If you recreate the examples directory exactly and rename it to something like examples2 and place it in the TOMCAT_HOME/webapps directory, then Tomcat should "autodeploy" it for you (create the server.xml context). Then all you'll need is jkmount /examples2/*.jsp ajp13 and possibly the one for servlets too. I can't remember. If you want to do it outside of the webapps directory you'll have to create the correct directory structure (specifically the /mycoolstuff/WEB-INF/web.xml) put your jsp's in it, then you'll need to make the context for it in server.xml or deploy it with the manager app, which does it for you. You'll still have to create the correct jkmount statement for examples2 for it in httpd.conf. At least that's how I understand it in TC4.1.x. You can auto deploy to the webapps directory via a war file, an expanded directory, or a jar file. You can use the manager app to deploy outside of webapps with a directory, a .war, or a jar and in each case the context is done for you. If you want to do it anyplace other than TOMCAT_HOME/webapps without the manager app, then you'll have to do the context yourself. Hope this helps, rls snip > I'm clear as to how to set up Apache, but not clear as to how to set > up Tomcat's server.xml file to read those directories as separate > sites. Also, I'm not clear what files need to be put where to get > JSP's to work (having attempted to move the examples into a virtual > host's examples directory). Any help on this would be a huge help. I'm new at this myself, so someone out there might correct me, but this is what I understand from the docs. Each JkMount specifies a worker to handle that request. Apache then forwards requests based on URI to the correct worker. If your virtual hosts use different workers, apache forwards the request to the correct worker. Thus, tomcat doesn't have to determine the virtual host, apache does that for you. --- Aryeh Katz VASCO www.vasco.com -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
