Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 28th, 2003, 05:52 PM
Registered User
 
Join Date: Sep 2003
Location: chicago, IL, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache + Tomcat Problem

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 With Quote
  #2 (permalink)  
Old January 2nd, 2004, 12:40 PM
Registered User
 
Join Date: Jan 2004
Location: Mount Hope, Ontario, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.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
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.