LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tomcat apache problem..please help (https://www.linuxquestions.org/questions/linux-software-2/tomcat-apache-problem-please-help-32238/)

Sridhar Guntur 10-08-2002 10:25 AM

tomcat apache problem..please help
 
I have apache 1.3.22 and tomcat 4.1.12 and jdk 1.4.1 and all of them are working fine i their place.(i.e java applets work in my webserver at port 80 and jsp pages work fine at port 8080). i wanted to link tomcat with apache and so downloaded, mod_jk.so, mod_jk.conf, and workers.properties files from the site,

http://support.clickshare.com/downl...-1a-tomcat.html

and followed all the instructions on it like,


To, /etc/httpd/conf/httpd.conf added

(1) LoadModule jk_module modules/mod_jk.so(at beginningof LoadModule list)

(2) AddModule mod_jk.c (at the beginning of AddModule list)

(3) Include /etc/httpd/conf/mod_jk.conf (at the end of AddModule list)

(4) Created mod_jk.conf using the example shown below and place it in /etc/httpd/conf/mod_jk.conf.
(5) Edited it so JkWorkersFile points to $TOMCAT_HOME/conf/workers.properties .


A copy of this sample file is like as below
**************************************************
********************************
# $Id: install-linux-1a-tomcat.html,v 1.1 2001/11/06 20:27:53 click Exp $
# Copyright (C) 2001 Clickshare Service Corp. Allrights reserved.
#
# The following line instructs Apache to load the jk module
#
#------------------------------
# The lastest version of this file should be on our FTP site:
# ftp://ftp.clickshare.com/pub/clicks...ent/mod_jk.conf
#----------------------------------------------------------------------

JkWorkersFile /usr/local/jakarta-tomcat-3.2.3/conf/workers.properties
JkLogFile logs/mod_jk.log

#
# Log level to be used by mod_jk
#
JkLogLevel error

#
# Test context mounts for Tomcat
#
JkMount /examples ajp12
JkMount /examples/* ajp12


# The following line mounts the hello context
JkMount /hello/servlet/* ajp12
JkMount /hello/*.jsp ajp12
**************************************************
***************************
(6) Edited $TOMCAT_HOME/conf/workers.properties and set workers.tomcat_home to the value of $TOMCAT_HOME. Then set workers.java_home to the directory where your JAVA_HOME lives and ps to the directory separator "/").

(7) and started tomcat first and then apache
(8) Finally, i tested my apache/tomcat configuration
http://localhost:8080/examples/serv...lloWorldExample (works!!)
http://localhost/examples/servlet/HelloWorldExample (doesn't work)

i get 500 internal server error :The server encountered an internal error or misconfiguration and was unable to complete your request.

so i see that my tomcat is not serving my apache.i have also cheked all the file permissions but they seem to be ok.what am i missing?
please help me. its been 6 hours since i was searching for a solution on the internet.

thanks a lot to you all in advance.

neo77777 10-08-2002 10:59 AM

As you are saying you have tomcat-4.1.2 (I beleive it is the correct version of it, and you have workers.properties
file from here from tomcat-3.2.3, these are two different versions though, anyway I have it setup that way on apache-1.3.26 and tomcat-3.3.1 final

This is what I've added to httpd.conf
################
# TOMCAT Directives #
################
</IfDefine>
Include /usr/local/tomcat-3.3/conf/auto/mod_jk.conf
__________________________________________
and tomcat is running on port 8080 as well. And I followed the following instructions from Yo-linux,
try this link it pertains to tomcat4
http://www.yo-linux.com/TUTORIALS/Li...ialTomcat.html
Scroll down to Apache-Tomcat Configuration section.

Sridhar Guntur 10-08-2002 11:27 AM

____________________________________________________
As you are saying you have tomcat-4.1.2 (I beleive it is the correct version of it, and you have workers.properties
file from here from tomcat-3.2.3, these are two different versions though, anyway I have it setup that way on apache-1.3.26 and tomcat-3.3.1 final

This is what I've added to httpd.conf
################
# TOMCAT Directives #
################
</IfDefine>
Include /usr/local/tomcat-3.3/conf/auto/mod_jk.conf
____________________________________________________

Yes, i have 4.1.12(i edited my post), and though i got the workers.properties file from tomcat-3.3 version, i changed it so that JkWorkersFile points to my $TOMCAT_HOME/conf/workers.properties

and edited $TOMCAT_HOME/conf/workers.properties and set workers.tomcat_home to the value of $TOMCAT_HOME. Then set workers.java_home to the directory where my JAVA_HOME lives and ps to the directory separator "/").

should i change anything else in workers.properties file or should i get a new version of it for my tomcat-4.1.12?please suggest

thanks for your reply neo77777.

neo77777 10-08-2002 11:44 AM

I think it would be a little more safe to get the appropriate properties file, take a look at the tutorial I linked you to.


All times are GMT -5. The time now is 04:25 AM.