This works on Apache 1.3.22 on RedHat Linux, using mod_webapp with 
tomcat 4.04b2. mod_webapp built from 
'jakarta-tomcat-connectors-4.0.4-b2-src'

Here are the relevant sections of httpd.conf:

---------
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c

UseCanonicalName On

NameVirtualHost 192.168.1.10

<VirtualHost 192.168.1.10>
     DocumentRoot /home/user/public_html
     ServerName www.domain.com
     ServerAlias test.domain.com
     WebAppConnection conn warp localhost:8008
     WebAppDeploy mywebapp conn /go
</VirtualHost>
---------

Ken Anderson


Brian Bernardo wrote:
> Can you send me your httpd.conf file then, because I still get the same
> problem following your suggestion below.
> 
> Brian
> 
> 
> -----Original Message-----
> From: Ken Anderson [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, April 26, 2002 8:28 AM
> To: Tomcat Users List
> Subject: Re: tomcat/apache with ALIASES (Was canonical names)
> 
> I just tried this, and it works!
> Also, 'UseCanonicalName' is On.
> Ken
> 
> 
> 
> Ken Anderson wrote:
> 
>>hmmmm... have you tried Apache's ServerAlias Directive? I know this 
>>works with static content, but I'm not sure if mod_webapp respects it or 
>>not..
>>
>><VirtualHost 192.168.1.1>
>>ServerName blah1.blah.com
>>ServerAlias blah2.blah.com
>>DocumentRoot /blah
>>WebAppConnection conn      warp  localhost:8008
>>WebAppDeploy     webapp    conn      /test
>></VirtualHost>
>>
>>Ken
>>
>>
>>
>>Brian Bernardo wrote:
>>
>>
>>>While that technically works, it launches a separate tomcat instance 
>>>within
>>>the single JVM instance.  Watch the logs in catalina.out and you see that
>>>for each WebAppDeploy line a new instance is launched.  This offers
>>>functionality, but sharing resources is never a good idea if you want any
>>>scalability.  This site is expected to get 550 concurrent sessions at any
>>>time.  This will not work out in such a demanding environment.
>>>
>>>Basically the line:
>>>
>>>Thu Apr 25 05:22:07 : 204 : TRACE : system : targetHost  :bt1.domain.com
>>>
>>>Suggests that tomcat launches using the one instance per targetHost.  
>>>If you
>>>have one WebAppDeploy and regardless of how you got there (proxy,
>>>mod_rewrite, virtual hosts etc) once you access any resource from the 
>>>webapp
>>>directory, you get forwarded to http://targetHost/webapp and you lose the
>>>user supplied prefix (bad thing).
>>>
>>>Any other suggestions out there?  There has to be a way to restrict 
>>>(or add)
>>>more than one targetHost for tomcat to allow several access methods.
>>>
>>>Brian
>>>
>>>
>>>
>>>
>>>-----Original Message-----
>>>From: Ken Anderson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 
>>>2002 2:02 PM
>>>To: Tomcat Users List
>>>Subject: Re: tomcat/apache with ALIASES (Was canonical names)
>>>
>>>Does something like this work?
>>>
>>>-----
>>>NameVirtualHost 192.168.1.1
>>>
>>><VirtualHost 192.168.1.1>
>>>ServerName blah1.blah.com
>>>DocumentRoot /blah
>>>WebAppConnection conn      warp  localhost:8008
>>>WebAppDeploy     webapp    conn      /test
>>></VirtualHost>
>>>
>>><VirtualHost 192.168.1.1>
>>>ServerName blah2.blah.com
>>>DocumentRoot /blah
>>>WebAppConnection conn2      warp  localhost:8008
>>>WebAppDeploy     webapp    conn2      /test
>>></VirtualHost>
>>>
>>>Ken
>>>
>>>
>>>Brian Bernardo wrote:
>>>
>>>
>>>>First of all, I am very proficient with DNS; that was not the 
>>>>question.  I
>>>>want users who go to http://name.domain/webapps to have the same
>>>>webappdeployment as http://name2.domain/webapps.  It is important that
>>>>however they got there (domain prefix) be maintained throughout their
>>>>session.  This works fine for static content, but as soon as anyone goes
>>>
>>>
>>>to
>>>
>>>
>>>>http://name?.domain/webapps they get redirected over to
>>>>http://ServerName/webapps.  ServerName is defined within the apache
>>>>httpd.conf file (same with vitualhost name).  That is not good.  
>>>>There has
>>>>to be a way to have either virtual hosts or some method for tomcat to
>>>
>>>
>>>serve
>>>
>>>
>>>>the same dynamic content regardless of how they got there without
>>>>redirecting. 
>>>>Any one know how to accomplish this?
>>>>
>>>>B
>>>>
>>>>
>>>>-----Original Message-----
>>>>From: Joseph Molnar [mailto:[EMAIL PROTECTED]] Sent: Thursday, 
>>>>April 25, 2002 8:28 AM
>>>>To: Tomcat Users List
>>>>Subject: Re: tomcat/apache with ALIASES (Was canonical names)
>>>>
>>>>No. I use A and CNAMES depending on the situation.  Do you have proper
>>>>aliases set up in Apache?
>>>>
>>>>
>>>>Joe
>>>>
>>>>----- Original Message -----
>>>>From: "Oki DZ" <[EMAIL PROTECTED]>
>>>>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>>>>Sent: Thursday, April 25, 2002 2:28 AM
>>>>Subject: Re: tomcat/apache with ALIASES (Was canonical names)
>>>>
>>>>
>>>>On 04/25 15:33 Hamish Marson wrote:
>>>>
>>>>
>>>>
>>>>>What you're using (Or trying to use)  is aliases... The DNS records 
>>>>>(CNAME
>>>>>etc
>>>>>al) are named after what they point AT (or more accurately) resolve to.
>>>>
>>>>
>>>>Thus
>>>>
>>>>
>>>>
>>>>>the CNAME record (Canonical name) points or resolves to the REAL 
>>>>>name of
>>>>
>>>>
>>>>the
>>>>
>>>>
>>>>
>>>>>host. (Literally, the dictionary term for canonical is the real 
>>>>>one). Just
>>>>>like
>>>>>the A record resolves TO the address...
>>>>
>>>>
>>>>
>>>>I think I have the same problems...
>>>>So, how do you set up virtual hosts in Tomcat?
>>>>I have tried to have <Host ../> elements in a Tomcat service and I used
>>>>CNAMEs
>>>>in them. It seemed that any hosts in the service would resolve to the 
>>>>same
>>>>contexts contained in the service (even though I have supplied different
>>>>URLs;
>>>>ie: different FQDNs).
>>>>
>>>>I guess the answer would be: just use A records (that point to the 
>>>>same IP
>>>>number). Is it correct...?
>>>>
>>>>Oki
>>>>
>>>>-- 
>>>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>>>
>>>>
>>>>
>>>>-- 
>>>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>>>
>>>>-- 
>>>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>>>
>>>>
>>>>
>>>
>>>
>>>-- 
>>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>>
>>>-- 
>>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>>
>>>
>>>
>>
>>
>>-- 
>>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>>For additional commands: <mailto:[EMAIL PROTECTED]>
>>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>>
>>
>>
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> 
> 



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to