I can't tell you exactly, because I didn't write it, but here is what I
have conferred from watching this list.

A connector binds directly to your TCP/IP stack, and allows access via
those addresses and ports.  Tomcat then reads the Request information
and determines the host and context.  http://www.server1.com/myApp


If you want a compare it to IIS, think this

Engine is IIS
Host is WebSite
Context is VirtualDirectory.

The reason why you would want more than one context is because you may
want more than one webapp per host

If you have two webapps called DestroyWorld and SaveWorld, you could put
those webapps anywhere on the machine and not necessarily together.  Say
c:\goodprograms\SaveWorld and c:\badprograms\DestroyWorld.  Using
contexts, you could define access to both of those webapps.

So you could type  http://www.site.com/DestroyWorld and
http://www.site.com/SaveWorld


As far as the documentation goes, It's not perfect, but it's not too bad
once you start reading it.  Just jump in, and hopefully you will be
swimming soon.


- Andrew

> -----Original Message-----
> From: neal [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, August 18, 2002 5:24 PM
> To: Tomcat Users List
> Subject: RE: Tomcat - IP binding for multiple web apps
> 
> 
> Thanks.
> 
> You point out two things: (1) how to specify which IPs to 
> listen on, and (2) how to associate a context with a host, 
> where the host name is the URI pointing to the webapp.
> 
> In Microsoft IIS, you bind an IP to each virtual host, and 
> its the DNS servers job to point you to the right IP, based 
> upon the URL lookup.  In your suggestion with Tomcat I see 
> how you are suggesting to bind IPs to Tomcat, but how does 
> Tomcat then make the leap to binding those Ips to the correct 
> virtual Host?
> 
> Also, I read in the provided link (thanks for that, btw) that 
> you can assign multiple contexts to each host, and multiple 
> hosts to an enginer.  I presume Tomcat is the engine, and 
> that a host is essentially a Virtual Host, correct?  How/why 
> would one then have multiple contexts per a single host?
> 
> Is it just me or is the Tomcat documentation a little lacking 
> in this area?
> 
> Thanks for your help!  :)
> 
> Neal
> 
> 
> -----Original Message-----
> From: Andrew Conrad [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 18, 2002 12:43 PM
> To: 'Tomcat Users List'
> Subject: RE: Tomcat - IP binding for multiple web apps
> 
> 
> Modify your Http/1.1 Connector and add an address attribute 
> to specify which IP address to listen on.  By default, the 
> Connector listens on ALL IP addresses.
> 
> 
> <Connector class="org.apache.catalina.connector.http.HttpConnector"
> address="127.0.0.1" />
> 
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/http11.html
> 
> From what I can tell, you can't define a webapp (defined as a 
> Context in the server.xml) as running on a specific address.  
> What you can do is use multiple Host entries to define Hosts 
> that pick up different DNS Names.
> 
> 
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/host.html
> 
> 
> <Host name="www.site1.com" >
>       <Context path="/webapp1" docBase="webapp1" />
> </Host>
> 
> <Host name="www.site2.com" >
>       <Context path="/webapp2" docBase="webapp2" />
> </Host>
> 
> 
> 
> - Andrew
> 
> > -----Original Message-----
> > From: neal [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, August 18, 2002 3:19 PM
> > To: Tomcat Users List
> > Subject: Tomcat - IP binding for multiple web apps
> >
> >
> > I would like to run multiple web applications from the same 
> instance 
> > of tomcat.  I have set this up in my dev environment, no problem.
> >
> > The problem is this:
> >
> > I can not figure out how to bind an IP address (one seperate IP per 
> > web app) to each of these web apps.  Actually, I haven't 
> even seen in 
> > the docs how to bing a single IP to Tomcat either????  DO I need to 
> > usa Appche (via Warp) to do this or something?
> >
> > Note:
> >
> > I am currently running standalone Tomcat 4.0.3, on Win2k, 
> > profesisonal.
> >
> >
> > Thanks.
> > Neal
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [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]>

Reply via email to