Hi,

I have been working on a web-app that has been running under tomcat 6
alone for a while. I am now configuring Apache to do some rewrite
rules with domains and then forward on to tomcat, which is working.

However, even with a directory deny rule in apache conf to block the
web-inf and meta-inf directories, requests to it are still getting
passed to tomcat. I confirmed these were working by disabling mod_jk
and restarting, and got the apache forbidden error. When I have mod_jk
running, it passes requests to meta-inf/context.xml to tomcat which
then returns a 404 result. It's sort of the same thing but not what I
want. If I put in a JkUnMount to those directories, then apache is
returning a forbidden error.

My environment :
-------------------------
CentOS4
Tomcat 6.0.20
Apache 2.0.52 (this is what the packaging utils wanted to install,
2.2.x isn't available)
mod_jk-1.2.28

workers.properties :
----------------------------
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=9009

mod_jk.conf :
--------------------
LoadModule    jk_module  modules/mod_jk.so
JkWorkersFile /etc/httpd/conf.d/workers.properties
JkShmFile     /var/log/httpd/mod_jk.shm
JkLogFile     /var/log/httpd/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkMount  /* worker1
JkUnMount /*.ico worker1
JkUnMount /*.jpg worker1
JkUnMount /*.gif worker1
JkUnMount /*.png worker1
JkUnMount /*.js worker1
JkUnMount /META-INF/* worker1     # without this, apache directory
directive to return a forbidden error doesn't happen
JkUnMount /WEB-INF/* worker1       # and this
JkMountCopy all

mod_jk.conf is included via the directive in httpd.conf :

Include conf.d/*.conf

which happens right after the LoadModule directives.

And in the virtual host directive to force a forbidden error :

  <Directory /home/www/web/ROOT/META-INF>
    AllowOverride none
    Order deny,allow
    Deny from all
    Satisfy all
  </Directory>

  <Directory /home/www/web/ROOT/WEB-INF>
    AllowOverride none
    Order deny,allow
    Deny from all
    Satisfy all
  </Directory>

Are the JkMount directives taking precedence over apache's Directory
directives? I have another web server running mod_jk-1.2.15, tomcat
5.5, apache 2.0.52 and I don't have this issue.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to