LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache/Tomcat/Mod_JK (https://www.linuxquestions.org/questions/linux-software-2/apache-tomcat-mod_jk-431627/)

chantman 04-04-2006 11:10 AM

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?

bathory 04-05-2006 04:32 AM

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.


All times are GMT -5. The time now is 09:32 AM.