There are 6 things you have to do:
1. acquire and configure the Jakarta ISAPI filter which transfers IIS ISAPI calls to AJP calls to Tomcat (or the JBoss Tomcat web server),
2. install the ISAPI services on IIS,
3. tell IIS the particular DLL is authorized to run,
4. enable 32-bit application pools (if you're running IIS in 64-bit),
5. configure the jakarta filter on your specific site within IIS, and
6. verify that IIS can write to the log directory and file you specified for the jakarta ISAPI filter.
In sequence, then:
1. acquire and configure the Jakarta ISAPI filter.
Download isapi_redirect.dll from http://tomcat.apache.org/download-connectors.cgi and place it in a directory on your server; mine is in \inetpub\jakarta.
The Tomcat connector configuration documentation (http://tomcat.apache.org/connectors-doc/) is quite good, but for two points:
a. you don't need to make the registry entries cited. You can configure the connector with a properties file named isapi_redirect.properties in the same directory as the isapi_redirect.dll.
b. the specific IIS 7 setup requires some extra steps and verification is a bit different (but shares many similarities) with the documentation provided (which works pretty well through IIS 6).
My isapi_redirect.properties file is shown below:
# Configuration file for the Jakarta ISAPI Redirector
# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges extension_uri=/jakarta/isapi_redirect.dll
# Full path to the log file for the ISAPI Redirector
log_file=C:\inetpub\logs\isapi.log
# Log level (debug, info, warn, error or trace)
log_level=info
# Full path to the workers.properties file
worker_file=C:\inetpub\jakarta\worker_files\workers.properties
# Full path to the uriworkermap.properties file
worker_mount_file=C:\inetpub\jakarta\worker_files\uriworkermap.properties
/myappcontextroot|/*=myworker
...and your workers.properties file might consist only of:
worker.list=myworkerworker.myworker.type=ajp13worker.myworker.host=localhostworker.myworker.port=8009
You'll want to look at the reference material for other configuration options, most especially connection_pool_size, for starters.
2. install the ISAPI services on IIS
Add role services as shown below; ensure the ISAPI services are selected and installed. (click for a larger image)
3. tell IIS the particular DLL is authorized to run (click for a larger image)
4. enable 32-bit application pools (if you're running IIS in 64-bit on a CPU where there's no 64-bit build for isapi_connector.dll) (click for a larger image)
5. configure the jakarta filter on your specific site within IIS
There are several steps here; the first 2 seem to be requirements of the Tomcat connector specifically rather than of IIS:
a. create a virtual "jakarta" directory pointed at the .dll
right-click on the site and select "add virtual directory"; point to the directory containing your isapi_connector.dll, and name the directory "jakarta".
b. enable that directory for execute privileges within IIS (not on the file system)
select the virtual directory, select "features view", and open the "Handler Mapping" control. "Edit Feature Permissions..." as shown below, and verify that ISAPI-dll is in the "Enabled" list.
(click for a larger image)
c. add the dll to the filters list
...as shown:
6. verify that IIS can write to the log directory and file you specified for the jakarta ISAPI filter.
Add role services as shown below; ensure the ISAPI services are selected and installed. (click for a larger image)
3. tell IIS the particular DLL is authorized to run (click for a larger image)
4. enable 32-bit application pools (if you're running IIS in 64-bit on a CPU where there's no 64-bit build for isapi_connector.dll) (click for a larger image)
5. configure the jakarta filter on your specific site within IIS
There are several steps here; the first 2 seem to be requirements of the Tomcat connector specifically rather than of IIS:
a. create a virtual "jakarta" directory pointed at the .dll
right-click on the site and select "add virtual directory"; point to the directory containing your isapi_connector.dll, and name the directory "jakarta".
b. enable that directory for execute privileges within IIS (not on the file system)
select the virtual directory, select "features view", and open the "Handler Mapping" control. "Edit Feature Permissions..." as shown below, and verify that ISAPI-dll is in the "Enabled" list.
(click for a larger image)
c. add the dll to the filters list
...as shown:
6. verify that IIS can write to the log directory and file you specified for the jakarta ISAPI filter.
Unlike earlier releases, there's almost no way to know if the ISAPI filter has loaded and is running. If the connector isn't working, though, there are two possibilities:
1. IIS hasn't handed the request off to the ISAPI filter, and
2. IIS has handed off the request, but the filter isn't configured correctly and the requests aren't being delivered to JBoss or Tomcat.
You can distinguish between these cases by looking at the filter log: if IIS actually invokes the ISAPI filter, you'll get a log file; it there's no log file, then most likely, IIS hasn't invoked the filter.
If your filter is misconfigured, change the filter log level to "debug" and run a few requests; almost always, the filter logging has enabled me to find and fix the configuration issue.
Great instructions. Were you able to get the connector to work without granting the "Everyone" group Read access to the file directory folder where the isapi_redirect.dll and worker files are located? When I remove the "Everyone" group the isapi_redirect.dll fails to load.
ReplyDeleteThanks
We set up a user specifically for all our web-related stuff, and gave read/write/execute access to that owner. So no--we didn't need to give it to everyone. But we did have the same owner as IIS.
ReplyDeleteMore specifically: IIS hasn't handed the request off to the ISAPI filter, and
DeleteFor the fact that don't see anything on the logs :s
Thank you very much.
ReplyDeleteHi,
ReplyDeleteI followed your steps and getting nothing back, no log files, if try hitting http://server/ or http://server/jmx-console I cant reach the JBoss default app or JMX console.
Any remote ideas of what the issue could be?
Thanks,
Hi there,
ReplyDeletefollowed the steps, but whenever I try to access a site on the Tomcat server, I am just presented the File download window. How can I fix this and the site is served?
This comment has been removed by the author.
DeleteYour Blog provides all my required things. This is a nice Blog. You explained here information about the thing that I was searching for. It helps me a lot. You are doing great. Thank you for providing me the useful information's. Visit: Jakarta Lifestyle
ReplyDelete