OK - it definitely is working now, the link below seemed to be describing my problem to a tee - i had the jpackage mod_jk2 rpm. http://cymulacrum.net/writings/tomcat5/a1204.html
Done exactly the same setup on a live server with a compiled mod_jk2 and it works as expected (tested with quite a few virtual hosts). Yang: apparently not, I have the following virtual setup...notice the appbase and context in server.xml just points to the apache documentroot, if apache sees a .jsp it palms off the request to tomcat where it finds the same file and compiles it on the fly. for apache (httpd.conf): <VirtualHost *> ServerName SOME.HOST.NAME DirectoryIndex index.html DocumentRoot "/var/www/html/beta" <Location "/*.jsp"> JkUriSet worker ajp13:localhost:8009 </Location> </VirtualHost> and tomcat (server.xml): <Host name="SOME.HOST.NAME" debug="0" appBase="/var/www/html/beta" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="/var/www/html/beta" debug="1"/> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="cust2_log." suffix=".txt" pattern="common" resolveHosts="false"/> </Host> On Thu, 2004-04-22 at 19:03, Yang Xiao wrote: > Wow, correct me if I'm wrong, but doesn't test.jsp have to be somewhere > under $CATALINA_HOME/ROOT no matter how you configure your virtual host in > Apache? > Yang > > -----Original Message----- > From: Mark Page [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 1:48 PM > To: Tomcat Users List > Subject: Re: [newbie] tomcat5+apache2 virtual hosting > > I fooled myself - forgot to clear-down browser cache after doing some > fiddling. :/ Still not working.... > > I am using mod_jk2 - and as far as I can tell apache and tomcat do talk, > for example if I move my test.jsp to $CATALINA/webapps/ROOT and browse > to http:/test.int/test.jsp it works, so I guess that something is wrong > with the context for test.int ??? And also, the 404 is from tomcat, so > apache is handing over to tomcat for .jsp but tomcat can't find them. > > > On Thu, 2004-04-22 at 18:37, Parsons Technical Services wrote: > > What was it???? > > > > > > ----- Original Message ----- > > From: "Mark Page" <[EMAIL PROTECTED]> > > To: "Tomcat Users List" <[EMAIL PROTECTED]> > > Sent: Thursday, April 22, 2004 1:24 PM > > Subject: Re: [newbie] tomcat5+apache2 virtual hosting > > > > > > > I've sorted it - thanks anyway :) > > > > > > On Thu, 2004-04-22 at 17:59, Mark Page wrote: > > > > Hi all, > > > > > > > > I'm going nuts trying to do something pretty straight forward, namely > > > > getting TOMCAT to serve .jsp files via apache virtual hosts and still > > > > keep the default tomcat stuff at port 8080. > > > > > > > > I've read every howto I can find and can only get one or the other to > > > > work. My confusion seems to revolve around the <context> element in > > > > server.xml. > > > > > > > > What I want is to be able to do is point at http://localhost:8080 and > > > > see the tomcat welcome page. I then want to point to > > > > http://test.int/test.jsp and see the .jsp output. > > > > > > > > The test.jsp file resides in /var/www/html/beta but I keep getting > > > > tomcat 404 error, so I guess it's having problems locating the .jsp > and > > > > therefore suspect my contexts are incorrect. > > > > > > > > I would be grateful is someone could have a look at my server.xml and > > > > hhtpd.conf snippets and enlighten me. > > > > > > > > Regards. > > > > > > > > > > > > > > > > this is how my server.xml is: > > > > > > > > <Host name="localhost" debug="0" appBase="webapps" > > > > unpackWARs="true" autoDeploy="true" > > > > xmlValidation="false" xmlNamespaceAware="false"> > > > > > > > > <Logger className="org.apache.catalina.logger.FileLogger" > > > > directory="logs" prefix="localhost_log." suffix=".txt" > > > > timestamp="true"/> > > > > > > > > <Context path="" docBase="ROOT" debug="0"/> <!--welcome page--> > > > > </Host> > > > > > > > > <host name="test.int" debug="0" appBase="/var/www/html/beta" > > > > unpackWARs="true" autoDeploy="true"> > > > > > > > > <Context path="" docBase="/var/www/html/beta" debug="9"/> <!-- where > > > > test.jsp resides --> > > > > > > > > <Logger className="org.apache.catalina.logger.FileLogger" > > > > directory="logs" prefix="test_int_log." suffix=".txt" > > > > timestamp="true" /> > > > > </host> > > > > > > > > and the relevant bit of httpd.conf: > > > > > > > > <VirtualHost *> > > > > ServerName test.int > > > > ServerAdmin [EMAIL PROTECTED] > > > > DocumentRoot /var/www/html/beta > > > > <Location "/*.jsp"> > > > > JkUriSet worker ajp13:localhost:8009 > > > > </Location> > > > > </VirtualHost> > > > > > > > > > > > > > > > > I have also tried using the workers2.properties file instead of the > > > > JkUriSet by entering > > > > > > > > [uri:test.int/*.jsp] > > > > worker=ajp13:localhost:8009 > > > > > > > > but it dosen't seem to make much difference > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]