Re: Best practice for virtual host configuration

2002-07-25 Thread Ryszard Lach

On Wed, Jul 24, 2002 at 09:46:28AM -0400, Cox, Charlie wrote:
 if your context is under the appBase, then it will autoload it. If your
 context is not under the appBase(shared contexts), then you 
 have to provide the path to it. 
 
 I've never tried leaving docBase empty for a context, so I don't know what
 path it would look under. I guess webapps could be  assumed as the default
 directory for defined contexts even if you change the appbase.
 
 so you changed your example to:
 
 Context path=
 docBase= debug=1
 reloadable=true
 /Context
 
 This would take the ROOT context, which is fine if all your virtual hosts
 use ROOT as their root context. I have different contexts that are the
 default context for their virtual hosts, so I have to provide a docBase to
 distinguish between them. My configuration is similar to your original
 except that I have a dummy appBase(prevent autoloading) and specify a
 absolute path for docBase.

Well, I suppose this won't work with mod_webapp - using application name
in WebAppDeploy in httpd.conf couses tomcat (probably) to search for
this name under appBase. So my working configuration is

appBase=webapps/aaa
docBase=aaa

and application in webapps/aaa/aaa. 

A little mesh, but I think I will be able to cut one 'aaa' as soon as
I'll be able to migrate to mod_jk (now I'm not because of mod_jserv used
with the same apache).

Regards,

Richard.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Best practice for virtual host configuration

2002-07-24 Thread Cox, Charlie



 -Original Message-
 From: Ryszard Lach [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 24, 2002 8:07 AM
 To: [EMAIL PROTECTED]
 Subject: Best practice for virtual host configuration
 
 
 Hi!
 
 How is (in your opinion) best practice for virtual host 
 configuration ?
 I see there is quite natural in tomcat configuring many applications
 under one host - one writes several Context sections with 
 appropriate
 docRoot and path attributes and that's all. When I configure several
 virtualhost I define
 
 
   Host name=aaa appBase=webapps debug=1 unpackWARs=false
 
 Context path=
 docBase=aaa/ debug=1
 reloadable=true
 /Context
 
   /Host
 
   Host name=bbb appBase=webapps debug=1 unpackWARs=false
 Context path=
 docBase=bbb debug=1
 reloadable=true
 /Context
 
   /Host
 
 but then I see in log, that for every host it is loaded every
 application installed in webapps directory. Should I define
 appBase=webapps/aaa and leave path empty instead ? (honestly I tried
 to, but there was a problem with mod_webapp then, it tried to deploy
 application webapps/aaa/aaa (one aaa was from WebAppDeploy 
 directive in
 apache).
 

if you change the appBase, then you need to change the docBase to be the
absolute path.

Charlie

 Any suggestions ?
 
 Richard.
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Best practice for virtual host configuration

2002-07-24 Thread Ryszard Lach

On Wed, Jul 24, 2002 at 08:37:50AM -0400, Cox, Charlie wrote:
 
 
 
 if you change the appBase, then you need to change the docBase to be the
 absolute path.
 
 Charlie
 

Are you sure ? I tried to leave docBase empty and it worked too.

R.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Best practice for virtual host configuration

2002-07-24 Thread Cox, Charlie

if your context is under the appBase, then it will autoload it. If your
context is not under the appBase(shared contexts), then you 
have to provide the path to it. 

I've never tried leaving docBase empty for a context, so I don't know what
path it would look under. I guess webapps could be  assumed as the default
directory for defined contexts even if you change the appbase.

so you changed your example to:

Context path=
docBase= debug=1
reloadable=true
/Context

This would take the ROOT context, which is fine if all your virtual hosts
use ROOT as their root context. I have different contexts that are the
default context for their virtual hosts, so I have to provide a docBase to
distinguish between them. My configuration is similar to your original
except that I have a dummy appBase(prevent autoloading) and specify a
absolute path for docBase.

Charlie

 -Original Message-
 From: Ryszard Lach [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 24, 2002 8:55 AM
 To: Tomcat Users List
 Subject: Re: Best practice for virtual host configuration
 
 
 On Wed, Jul 24, 2002 at 08:37:50AM -0400, Cox, Charlie wrote:
  
  
  
  if you change the appBase, then you need to change the 
 docBase to be the
  absolute path.
  
  Charlie
  
 
 Are you sure ? I tried to leave docBase empty and it worked too.
 
 R.
 
 -- 
 ** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
  tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]