At 8/3/2001 08:53 AM +1000, you wrote:
>Robert,
>
>what are you trying to achieve here?  There are two things about this
>that strike me as odd:
>
>1. in httpd.conf you have ServerName www.foobar.net, whilst in
>server.xml you have host name="www.raptor.net" - as I understand it
>these should be the same name.

Yes, that was a cock-up on my part, I was trying to remove real data from 
the list.  They are appropriately consistent on the server.


>2. the DocumentRoot you have for apache should contain all your static
>files.  the docBase for tomcat however is completely different.  Perhaps
>appBase would be a better name for the attribute.  That directory should
>contain your WEB-INF directory, along with its contents, and quite
>possibly jsp and other files that are used by the application.  However
>- I wouldn't see them as being the same directory, but I support there
>is no reason why they couldn't be.  If you are going that way, make sure
>you prevent ppl accessing /WEB-INF directly through apache.

I have strange habits in site design I'd like to be able to swap an 
index.html for index.xml.  I've got a better understanding of things now, 
but I'm not sure why there is an enforced segregation of files.  Since most 
of my xml files will be in a subdirectory, I'm going to try putting a 
symlink in the webapps directory and see if I can work things out that 
way.  Otherwise I assume I have to run separate instances of tomcat for 
different virtual servers?


>cheers
>dim
>
>Robert Schmid wrote:
> >
> > I swear I've read the documentation!  I have Virtual Hosts Contexts 
> defined;
> >
> > Server.xml
> >
> >      <Host
> > name="www.raptor.net">
> >      <Context path="" docBase="/home/net/foobar/htdocs"
> > debug="0"/>
> >      </Host>
> >
> >      <Host
> > name="www.blackgryphongraphics.com">
> >      <Context path="" docBase="/home/com/barfoo/htdocs" debug="0"/>
> >      </Host>
> >
> > httpd.conf:
> >
> > <VirtualHost 209.134.140.42>
> >      ServerName www.foobar.net
> >      JkMount /*.jsp ajp13
> >      JkMount /*.xml ajp13
> >      JkMount /servlet/* ajp13
> >      AddType text/xml .xml
> >      DocumentRoot /home/net/foobar/htdocs
> > ...
> >      <Directory "/home/net/foobar/htdocs/">
> >          Options All
> >          AllowOverride Authconfig
> >      </Directory>
> >
> > I want to be able to put xml files and jsp in the main directory or at
> > least in a directory  entirely controlled by foobar.
> >
> > Is the docBase relative to $TOMCAT_HOME or is it an absolute path?
> > What is appBase?  Does this work in Tomcat 3.x or only in 4.x?
> >
> > Do I need to run separate instances of Tomcat for each virtual host?
> >
> > Do I have to have a webapps directory in each Virtual Host. How about a
> > WEB-INF and a web.xml directory in each directory?
> >
> > The documentation seems out of date especially the links regarding web.xml.
> >
> > Help is greatly appreciated!

Reply via email to