Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 17510 invoked from network); 22 Aug 2003 00:33:18 -0000 Received: from host213-120-115-98.in-addr.btopenworld.com (HELO www.roamware.co.uk) (213.120.115.98) by daedalus.apache.org with SMTP; 22 Aug 2003 00:33:18 -0000 Received: from roamware2eg62k (roamware-2eg62k.development.roamware.com [10.0.0.6]) by www.roamware.co.uk (Postfix) with SMTP id ABFEC36C002 for ; Thu, 21 Aug 2003 23:42:01 +0100 (BST) From: "David Wynter" To: "Tomcat Users List" Subject: RE: 2 VirtualHosts same IP address and port on Tomcat not working Date: Thu, 21 Aug 2003 23:35:42 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <3F451FB6.4010004@johnturner.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi John, Thanks for the pointers. I found a good tutorial on vhosts but using jk2 in the Tomcat 4.1 docs. So it helped a little. I have change to using DocumentRoot, less confusing. I also tried full paths instead of relative. I had removed the Context entries because it meant I could at least type in the full servlet URL and see the site, with the ones I had (which must have been wrong) I couldn't. Anyway I am at the stage where using the example files I am forbidden (403) from seeing www.stpenable.com or www.roamware.co.uk I think because of the entry. But I can see the /se servlet with the full URL but not rwtransform or rwsite webapps. Here is the bottom of my httpd.conf. I think i need to change the overall DocumentRoot to /usr/local/jakarta-tomcat-4.1.12/webapp2/ , this directive is easy to understand in the context of serving up static pages, but not where all content is dynamically served by a servlet? I also think I need to get rid of the entry and I might get further along. --------------------> DocumentRoot "/usr/local/jakarta-tomcat-4.1.12/webapp2/se" Options None AllowOverride None DirectoryIndex index.html index.vm Options None AllowOverride None Order allow,deny Deny from all Order Allow,Deny Order Allow,Deny NameVirtualHost * # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # JkWorkersFile "/usr/local/tomcat/conf/jk/workers.properties" JkLogFile "/usr/local/tomcat/logs/mod_jk.log" JkLogLevel debug ServerName www.stpenable.com #################### www.stpenable.com:/se #################### ServerAlias localhost # Static files DocumentRoot /usr/local/jakarta-tomcat-4.1.12/webapp2 JkMount /se/servlet/* ajp13 JkMount /se/*.vm ajp13 #################### www.stpenable.com:/rwtransform #################### # JkMount /rwtransform/servlet/* ajp13 # JkMount /rwtransform/*.vm ajp13 ServerName www.roamware.co.uk #################### www.roamware.co.uk:/rwsite #################### # Static files DocumentRoot /usr/local/jakarta-tomcat-4.1.12/webapp1/rwsite JkMount /servlet/* ajp13 JkMount /*.vm ajp13 Now my Hosts section of the Server.xml--------------------------> localhost I am understanding a bit more how the connectors work. But I have worked 16 hours a day for the last 2 on this. I need some sleep. Regards, David > -----Original Message----- > From: John Turner [mailto:tomcat-user@johnturner.com] > Sent: 21 August 2003 20:39 > To: Tomcat Users List > Subject: Re: 2 VirtualHosts same IP address and port on Tomcat not > working > > > > Did you remove the Context entries for some reason? They are critical. > > Also, in httpd.conf you have: > > # Static files > Alias /rwsite "/usr/local/tomcat/webapp1/rwsite" > > and later > > JkMount /rwsite/servlet/* worker1 > JkMount /rwsite/*.vm worker1 > > Thus, the URLs that Apache would expect would be: > > www.roamware.co.uk/rwsite/rwsite/servlet/rwsite/templates/index.vm > > Aside from the three "rwsite" entries this looks pretty convoluted to me. > > If you have /rwsite in an Alias in httpd.conf, then your JkMount would > be, AFAIK: > > JkMount /servlet/* worker1 > JkMount /*.vm worker1 > > John >