Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 28th, 2003, 05:52 PM
Registered User
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache + Tomcat Problem

i've installed Apache 1.3.26 and Tomcat 4.1.27 on my RedHat 9. i tried to connect Apache and Tomcat with mod_jk2-1.3-eapi.so from the tomcat side it works jus fine but when i start apache. this is error i'm getting:

Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/local/apache/bin/apachectl start: httpd could not be started

would be glad is someone can help me out.
Old January 2nd, 2004, 12:40 PM
Registered User
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Hey it sounds like you're were I was at one time. Hope you're not losing too much hair. I'll tell you what I did to get both 'working' together. Just to warn you though, I have another issue that I've posted recently.

1) Make sure Apache works on it's own.
2) Make sure Java SDK/JRE works.
3) Make sure Tomcat works on it's own.
1) You need your Apache source (http://www.redhat.com/downloads/mirror.html). Get the RPM and install. It should end up in /usr/src/redhat/SOURCES/httpd-######. Go there and ./configure.
2) Download the latest source for the mod_jk (http://jakarta.apache.org/builds).
3) Untar the above in /usr/local.
4) /usr/local/mod_jk###/jk/native/buildconf.sh
5) ./configure --with-java-home=${JAVA_HOME} --with-apache=/usr/src/redhat/SOURCES/httpd-#####
6) make
7) cd apache-####
8) make mod_jk.so
9) cp mod_jk.so /usr/lib/httpd/modules
1) Edit tomcat server.xml /usr/local/jak*/conf
2) Look for the line <Server port="8005", add the following after it <Listener className="org.apache.ajp.tomcat4.config.ApacheCon fig" modJk="/usr/lib/httdp/modules/mod_jk.so" />
3) Look for the line <Host name="localhost", add the following after it <Listener className="org.apache.ajp.tomcat4.config.ApacheCon fig" append="true" forwardAll="false" modJk="/usr/lib/httpd/modules/mod_jk.so" />
4) Change <Host name="localhost" to what ever is in your httpd.conf file.
5) Edit /etc/httpd/conf/httpd.conf
6) Change ServerName to what ever you made the name in server.xml
7) At the very end of the file add "Include /usr/local/jakarta-tomcat-###/conf/auto/mod_jk.conf" (without the quotes!!!!).
8) Now make sure that the /conf/auto directory exists in you tomcat directory. If not add it.
9) Add folder /conf/jk in you tomcat directory.
10) Create file called workers.properties
11) Add the following to the file
12) localhost must equat what you put in server.xml and httpd.conf
13) You can call the worker.list=ajp13 anything i.e. worker.list=yourconnector, you just have to change the references to it appropriately.
1) Start Tomcat first, it should create the mod_jk.conf in /conf/auto
2) Start Apache
3) Now if you enter http://localhost/examples it will go to the tomcat directory

Now comes the nightmare. My jsp pages are not being compiled by tomcat, they're just getting returned as HTML. So if you have any better luck please reply to my post.

Jeremy Foster

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache tomcat problem... joshi.sujit Apache Tomcat 0 April 15th, 2008 09:34 AM
apache tomcat manager problem u01jmg3 Apache Tomcat 0 March 17th, 2007 07:21 AM
Apache tomcat connection problem anu1 Apache Tomcat 0 January 26th, 2007 03:12 PM
Problem in configuring tomcat and apache jbashir Servlets 1 October 9th, 2006 08:28 PM
Problem with Servlet from Tomcat to Apache holdmykidney Servlets 0 April 28th, 2005 07:38 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.