It is my understanding that JkMount is deprecated and no longer used in tomcat6. How would I make the following rule with only ajp?

JkMount /*/servlet/* ajp13

  • isn't all the content served from the tomcat? Why are you using "/*/"? – Paul Jan 12 '11 at 20:47

JkMount is not part of tomcat. It is a configuration directive of the module mod_jk, from apache, and it is not deprecated.

You have a couple of options to forward requests from apache to an application running on tomcat. One is the use of mod_jk, which basic syntax (this is an Apache directive) is:

JkMount [url] [worker]

In your example, the worker is named ajp13 which is an unlucky choice because it is mistaken with the name of the protocol mod_jk uses. Workers are configured in workers.properties on your reverse proxy (apache2 - and the path depends on wich OS you are using). You can have a deeper look to configuration options of worker.properties at the tomcat connector reference guide. Yu can read this on apache directives related to mod_jk

Other option is to use the module mod-proxy-ajp. It is sure simpler to configure but depending on the scenario you might want to use mod_jk over mod-proxy-ajp. There is a related discussion on this on serverfault, and another one on stackoverflow.

Personally I believe that nowadays there is no need to recompile practically anything. Debian has its own package for mod_jk, and you can get rpm files for rhel and rh-like distros.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.