Subject: Apache + Tomcat Problem
Posted By: rammy Post Date: 9/28/2003 5:52:08 PM
hi
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.

Reply By: pzh19z Reply Date: 1/2/2004 11:40:53 AM
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.

INIT
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.
MOD_JK
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
CONNECT
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.ApacheConfig" 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.ApacheConfig" 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
workers.tomcat_home=/usr/local/jakarta-tomcat-####
workers.java_home=/usr/java/j2sdk1.4.####
ps=/
workers.list=ajp13
workers.ajp13.port=8009
workers.ajp13.host=localhost
workers.ajp13.type=ajp13
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.
START
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

Go to topic 8081

Return to index page 976
Return to index page 975
Return to index page 974
Return to index page 973
Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967