Link to home
Start Free TrialLog in
Avatar of grexx
grexx

asked on

Installing mod_jk for Apache Tomcat on Windows 2000

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
ASKER CERTIFIED SOLUTION
Avatar of CajunBill
CajunBill

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of grexx
grexx

ASKER

I meant mod_jk2 and have installed mod_jk2. The module in the apache module folder is called mod_jk2.so.
Avatar of grexx

ASKER

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
Avatar of grexx

ASKER

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.
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!