Tomcat and IIS Installation process (jk2).
This would be my way of configuring the JK2 redirector to work as quickly and simple as possible.
First of all, download the component needed to do the connection isapi_redirector2.dll
Note : replace $tomcat_home with your tomcat installation directory, e.g. "C:\jakarta-tomcat-4.1.24".
Now, create the workers2.properties file where you define the worker "main".
[shm] file=$tomcat_home/logs/jk2.log size=1048576 # Example socket channel, override port and host. [channel.socket:reynir_net:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:reynir_net:8009] channel=channel.socket:reynir_net:8009 # Uri mapping [uri:/*.jsp] [uri:/web/*] [uri:/view/*] worker=ajp13:reynir_net:8009 # define the worker [status:status] # Uri mapping [uri:/jkstatus/*] worker=status:status
Save this file into c:\$tomcat_home\conf\workers2.properties
You will also need jk2.properties, the only line I've got in my file is like this :
This line is to make IIS take care of authentication, rather than tomcat.
You can also set up an realm in tomcat and this value true and tomcat will take care of http authentication.
Save this file into c:\$tomcat_home\conf\jk2.properties
You need to create a registry mergable file such as the one below , and merge it into the registry.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0] "serverRoot"="$tomcat_home" "extensionUri"="/jakarta/isapi_redirector2.dll" "workersFile"="$tomcat_home\\conf\\workers2.properties" "logLevel"="DEBUG"
You must be sure these values are correctly spelled, and you must check if these files exist.
Ok, now you must open the Internet Information Server Management Console, accessable through:
- [start]->settings->control panel->Administrative tools->Internet Services Manager
Select the Host you are working with.
"Right click" it and open it's properties dialog.
Select the ISAPI Filters tab.
type in filtername : jakarta
type in Executable : $tomcat_home\conf\connector\isapi_redirector2.dll (or browse to it).
Next create a new virtual directory, named jakarta. It's "Local path" should be C:\$tomcat_home\conf\connector
Now, open the services dialog (from control panel-> administrative tools -> services).
restart the "World Wide Web Publishing Service".
now go back to the Internet service manager, and check if the arrow in the ISAPI Filter dialog has turned green.
If it has not turned green one or more of the paths in the registry-file you merged to the registry (in above step) is incorrect.
You must run regedit (from start -> run -> regedit) and browse to HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0.
Now review the paths, the redirector not finding the configuration files is the only reason for a red arrow.
Problems that have occured, are not big, probably the biggest is the fact that I've never got any errors or debug info in the logfile.