[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Installing mod_jk for Apache Tomcat on Windows 2000

Posted on 2004-11-24
5
Medium Priority
?
1,172 Views
Last Modified: 2008-02-20
I have a Windows 2000 server with working Apache 2.0.52 and Tomcat 4.1.24. I'd like to use mod_jk to be able to serve all pages via one port. I have downloaded the mod_jk binary, unpacked it, copied the module into the apache module folder, and configured it using the following manual:

http://www.devside.net/web/server/windows/Tomcat

I created the workers2.properties file, and configured the httpd.conf and jk2.properties files. See below for all the code.

When I try to go to a test-page, I get a 404-error. The Apache 404-page does not mention mod_jk, like I've seen on other installations. It simply says "Apache/2.0.52 (Win32) Server at localhost Port 80", and I believe "mod_jk" should be mentioned somewhere in there.

======================================
jk2.properties - I added the following line:
channelSocket.port=8009

httpd.conf - I added the following lines:
LoadModule jk2_module modules/mod_jk2.so
JkSet config.file "C:/www/Apache2/conf/workers2.properties"

workers2.properties:
[shm]
file=C:/www/Apache2/logs/shm.file
size=1048576

[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[status:status]

[uri:localhost/jkstatus/*]
group=status:status

[uri:localhost/jsp-examples/*]
worker=ajp13:localhost:8009

[uri:localhost/servlets-examples/*]
worker=ajp13:localhost:8009
0
Comment
Question by:grexx
  • 3
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
CajunBill earned 750 total points
ID: 12676882
Hi grexx,
there are two different modules: mod_jk and mod_jk2.
YOu say that you installed "mod_jk", but you reference "jk2" in your httpd.conf file.
What do the APache logs say - do they complain about this?
HTH BIll
0
 
LVL 1

Author Comment

by:grexx
ID: 12680584
I meant mod_jk2 and have installed mod_jk2. The module in the apache module folder is called mod_jk2.so.
0
 
LVL 1

Author Comment

by:grexx
ID: 12680843
I reinstalled Apache, tried again, and got an Internal Server Error. I can open http://localhost/jkstatus/jkstatus, but don't know what that means. The other links from the devside manual (see above link) give the internal server error. Tomcat works normally.

One other thing changed. On the error-pages it says the name of the server. Now it mentions jk_mod: Apache/2.0.52 (Win32) mod_jk2/2.0.4 Server at localhost Port 80.

The Error.log says:

[Fri Nov 26 14:21:23 2004] [error] channelApr.open() attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed 730061
[Fri Nov 26 14:21:24 2004] [error] ajp13.connect() failed ajp13:localhost:8009
[Fri Nov 26 14:21:24 2004] [error] ajp13.service() failed to connect endpoint errno=0 No error
[Fri Nov 26 14:21:24 2004] [error] ajp13.service() Error  forwarding ajp13:localhost:8009 1 1
[Fri Nov 26 14:21:24 2004] [error] mod_jk2.handler() Error connecting to tomcat 120000, status 0
0
 
LVL 1

Author Comment

by:grexx
ID: 12681501
I just found the problem. I forgot to edit the server.xml file for Tomcat. The connector to port 8009 was still commented out. Well it works, and for pointing me in the right direction I give you - CajunBill - the points.
0
 
LVL 7

Expert Comment

by:CajunBill
ID: 12684621
Thanks, grexx, for giving the points for giving a start in the right direction.
There are other people on EE who have failed to appreciate that even when the help was more extensive and clearer.
Ask for help any time!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question