LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2006, 11:10 AM   #1
chantman
LQ Newbie
 
Registered: Jan 2006
Posts: 17

Rep: Reputation: 0
Apache/Tomcat/Mod_JK


Hi Everyone,

I'll try to explain this as best I can...

I'm running a RedHat 9.0 server, with Apache and Tomcat installed. I *believe* I've successfully installed mod_jk. I built my mod_jk.so from source. I then took that source file and put it in /etc/httpd/modules (it has executable rights). I've modified apache and restarted it with no errors. The problem I'm running into is getting my httpd.conf file to correctly send certain directories to Tomcat. Here is some excerpts from my files:

httpd.conf
---------------------------

LoadModule jk_module modules/mod_jk.so
JkWorkersFile "/jakarta-tomcat-4.1.31/conf/worker.properties"
JkLogFile "/var/log/mod_jk.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkMount /usasweb worker1
JkMount /usasweb/* worker1

--------------------------------

worker.properties
---------------------
worker.list=worker1
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.type=ajp13

-------------------------------

So, if I point my browser to http://servername/usasweb I get an error from Apache that says Object Not Found.

Can anyone please help me?

Thanks!

-Mike

P.S. How much of a performance hit and I taking if I don't use the mod_jk and just go directly to tomcat for everything?
 
Old 04-05-2006, 04:32 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,158
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
According to my installation of tomcat (4.1.31) along with apache (1.3.34) you should:
1. Include mod_jk.conf in your httpd.conf:
Code:
Include /path/to/tomcat/conf/auto/mod_jk.conf
2. The file name is workers.properties not worker.properties (as defined in mod_jk.conf) and contains the following:
Code:
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
3. server.xml should contain:
Code:
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" modJk="/path/to/mod_jk.so" />
...
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
               port="8009" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>
Anyway the tutorial I've followed is here to help you further.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache, tomcat & mod_jk jonathon Linux - General 1 06-29-2006 01:06 AM
Apache Tomcat mod_jk connector dashp Linux - Newbie 1 04-01-2005 01:34 PM
tomcat,apache,mod_jk + localhost dashp Linux - Software 1 03-27-2005 08:06 PM
connecting Apache 1.3.x and Tomcat 5.5: mod_jk [GOD]Anck Slackware 0 03-22-2005 09:27 AM
mod_jk-2.0.42.so - apache-tomcat connector anura Linux - Software 0 10-11-2004 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration