tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Bouman <M.Bou...@telecats.nl>
Subject Apache 1.3.14 + Tomcat 3.2 - Context
Date Tue, 05 Dec 2000 09:02:44 GMT
Hi everyone,

I have put a directory 'samples' as a subdir of 'htdocs'. In it I placed the
content of %TOMCAT%\webapps\examples.
I have put these lines in 'server.xml':

<Context path="" 
                 docBase="c:/Apache/htdocs" 
                 debug="0" 
                 reloadable="true" > 
</Context>

<Context path="/samples" 
                 docBase="c:/Apache/htdocs/samples" 
                 debug="0" 
                 reloadable="true" > 
</Context>

and these in 'mod_jk.config' (which I include with A[ache hhtpd.conf):

#######################################################
# Manual configuration for the /samples context starts.
#######################################################

#
# The following line makes apache aware of the location of the /voyager
context
#
Alias /samples c:/Apache/htdocs/samples
 <Directory "c:/Apache/htdocs/samples">
     Options Indexes FollowSymLinks
 </Directory>

#
# The following line mounts all JSP files to tomcat
#
JkMount /samples/servlet/* ajp13
JkMount /samples/*.jsp ajp13

#
# The following line prohibits users from directly accessing WEB-INF
#
<Location /samples/WEB-INF/ >
     AllowOverride None
     deny from all
</Location>

#
# Use Directory too. On Windows, Location doesn't work unless case matches
#
<Directory "c:/Apache/htdocs/samples/WEB-INF/">
    AllowOverride None
    deny from all
</Directory>
#######################################################
# Manual configuration for the /samples context ends.
#######################################################

The JSP files work fine, but the servlets don not.
When I look into 'error.log' from Apache it says: client denied by server
configuration: c:/apache/htdocs/samples/web-inf
If I disable (comment (#)) the Location and Directory tags (see above) they
do work, but WEB-INF is not protected anymore.

Does anyone have a solution to this problem?


Martin

Mime
View raw message