.htaccess apache-tomcat not working

I have an apache tomcat server integrated with mod_jk. I created .htaccess files in directories that I want to limit. but the problem is that .htaccess works in apache served directories, but not in directories served by tomcat.

The root of the Apache document is / var / ww / html. I created a test directory under it and its performance.

But in / usr / local / src / apache -tomcat-6.0.35 / webapps / examples I created .htaccess and did not work.

What could be the reason?

+4
source share
1 answer

.htaccess are Apache web server files, not Tomcat. Tomcat simply ignores these files. If you apply through mod_jk, then everything that JkMount displays in Tomcat is not processed .htaccess. If you need to protect Tomcat password passwords, you need to create Realm in Tomcat and secure the web resource. Old but I think is still an exact example

+18
source

Source: https://habr.com/ru/post/1411695/


All Articles