I'm trying to configure Apache2 + Tomcat using the mod_jk on an Ubuntu 10.04.
I installed everything and configured, but it always returns the source code of my JSP files. I've read around that the most possible problem is that Httpd isn't redirecting the requests to Tomcat as it should. So, tried to fix it using many tutorials and explanations, none worked for me.

1 Answer
1

mod_jk directives aren't inherited by virtual hosts by default. Either move the mod_jk directives inside the virtual host or use the JkMountCopy directive. See the mod_jk docs for details.

If that still doesn't work, take a look at the mod_jk log. You may wish to turn it up to debug level until things are working as required. While you are at it, cleaning up your workers.properties wouldn't hurt:

remove the workers.* properties that don't do anything

remove the ps=/ line

remove the load balancing entries you aren't using

They are probably not causing the problem but they certainly aren't helping. Keep things as simple as possible until it works.

Which directives? All of them? If you said about JkMount, the result is the same.. =/
–
JaymeMay 9 '12 at 15:53

As per the docs I linked you to, it varies by directive but JkMount and JkUnmount are the main ones. I'll update the answer with some further info.
–
Mark ThomasMay 9 '12 at 16:09

The docs were the first place I went, but they just say what which directive do, not how. The examples they provide, when provide, are horrible, just make sense to users experienced on it. =/ I still trying to make things work, but they still, actually, the same... ><
–
JaymeMay 9 '12 at 18:22