aspose file tools*
The moose likes Tomcat and the fly likes Apache and Tomcat connection not working. Please help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache and Tomcat connection not working. Please help!" Watch "Apache and Tomcat connection not working. Please help!" New topic

Apache and Tomcat connection not working. Please help!

Allan Allanm

Joined: Jul 16, 2013
Posts: 1

We have a configuration where the web server is Apache and JSP is served by Tomcat.
Apache used to forward JSP requests to Tomcat via mod_jk / ajp13 connector.
It was all working fine when both Apache and Tomcat were executing as "root"

Due to some security considerations APache / Tomcat now executes as non root.
Now all of a sudden the configuration does not work.
JSP pages are displayed as plain code .

I could figure out that APache and Tomcat are both running correctly.ok
Apache is showing the static html pages.
No specific error messages in the log files either.
But for some reason apache is not communcating with Tomcat.

What could be the issue? Or any pointers on how to investigate what is wrong?

Thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15639

Apache must be started as root, but best practices are that it should run as non-root. That capability is built into apache.

Tomcat should not run as root. As long as the default connector ports are used, that is not a problem.

I haven't been keeping track (I use mod_proxy as my connector), but my understanding is that mod_jk3 was deprecated because they were back-porting its capabilities into mod_jk2 about as fast as they were developed, while mod_jk3 never got reliably functional. So you may be having problems related to that.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Apache and Tomcat connection not working. Please help!
Similar Threads
Apache and Tomcat questions
How to make Tomcat and Apache cooperate?
My *.jsp files will not execute unless in /servlet path.
JSP's dynamic content not getting displayed
How to configure tomcat handle jsp files from apache DocumentRoot