This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Integrating Tomcat with Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Integrating Tomcat with Apache" Watch "Integrating Tomcat with Apache" New topic
Author

Integrating Tomcat with Apache

Alan Shiers
Ranch Hand

Joined: Sep 24, 2003
Posts: 237
Hi there,

I'm trying to integrate Tomcat with Apache. The instructions I've seen repeatedly on the NET are as follows:

1. Download
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from

http://jakarta.apache.org/builds/jakarta-t...ase/v2.0.2/src/

2. Uncompress it and extract the tar file.

3. cd to
jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2

4. chmod u+x configure

5. Run configure with:

./configure \
--with-apxs2=<apache-root-directory>/bin/apxs \
--with-tomcat41=<tomcat-root-directory> \
--with-java-home=<java-root-directory> \
--with-jni \
--with-pcre

For example:

./configure --with-apxs2=/usr/local/apache/bin/apxs \
--with-tomcat41=/home/tomcat \
--with-java-home=/usr/java \
--with-jni \
--with-pcre

6. Run make

7. The two .so files (mod_jk2.so and jkjni.so) will be
in:

jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2

8. Copy those to files to
<apache-root-directory>/modules with the
proper permissions.

9. Configure Apache and Tomcat

10. Restart and enjoy


Well, I've managed to obtain the jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz file and uncompress it. However, I'm getting stuck on item 5:

5. Run configure with:

./configure \
--with-apxs2=<apache-root-directory>/bin/apxs \
--with-tomcat41=<tomcat-root-directory> \
--with-java-home=<java-root-directory> \
--with-jni \
--with-pcre

I know the paths to tomcat and java but because I don't know the path to apache on Fedora Core 4, I am unable to provide one. When I run the configure without the line:
--with-apxs2=<apache-root-directory>/bin/apxs \
The whole configuration thing fails. I keep getting an error message saying:

no apxs given
no apache given
configure: error: Cannot find the WebServer

Obviously, I have to provide the path to the server and in many examples they site /usr/local/apache/bin/apxs as being the path. That is not the case on my machine! I did a complete search on my drive and didn't find a single directory named apxs.

What is the path supposed to be for the arguement: --with-apxs2=<apache-root-directory>/bin/apxs ???

Alan
 
Consider Paul's rocket mass heater.
 
subject: Integrating Tomcat with Apache
 
Similar Threads
Configuring Tomcat 4 with IIS 6
mod_webapp build help?
Apache-Tomcat Connection
Apache 2.0.5.3 + Tomcat 5.5.4 connector on WinXP
Connection between tomcat and apache