tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Weiss <swe...@aamc.org>
Subject Re: tomcat + apache : new <Context>
Date Fri, 12 May 2000 21:22:10 GMT
Alexander Kogan wrote:
> 
>  But it doesn't work with apache server, because tomcat
> produced following lines in  tomcat-apache.conf
> 
> Alias /CdCollection
> /usr/local/jakarta-tomcat/webapps/CdCollection
> <Directory "/usr/local/jakarta-tomcat/webapps/CdCollection">
>     Options Indexes FollowSymLinks
> </Directory>
> ApJServMount /CdCollection/servlet /CdCollection
> <Location /CdCollection/WEB-INF/ >
>     AllowOverride None
>     deny from all
> </Location>
> 
> It puts my context into default "webapps" place.
> 
> Does anybody know how to work it out?

There are two ways you can get this to work:

1) Edit tomcat-apache.conf yourself after it is created by Tomcat. Then
rename the file and include that in Apache's httpd.conf, instead of
tomcat-apache.conf.

 or

2) In server.xml, look for the following:

    <!-- Add "home" attribute if you want tomcat to be based on a
different directory
         "home" is used to create work and to read webapps, but not for
libs or CLASSPATH.
         Note that TOMCAT_HOME is where tomcat is installed, while
ContextManager home is the
         base directory for contexts, webapps/ and work/
      -->

  Just after that there is:

    <ContextManager debug="0" workDir="work" >

  After that line, add something like the following:

    <ContextManager home="/home/steve/dev/java" />

You need to make sure that you have subdirectories called "webapps" and
"conf" in that directory. Then, when you start Tomcat, it will create
tomcat-apache.conf in your "conf" directory (not the one where Tomcat is
installed), and this one will have the correct path info. Then you can
include that in httpd.conf. Tomcat will also create a "work"
subdirectory where it puts compiled JSPs.

-Steve


-- 
Steve Weiss      Association of American Medical Colleges
(202)828-0428    mailto:sweiss@aamc.org    http://www.aamc.org

Mime
View raw message