Prerequisite :
- IIS server version 6+ is installed and running.
- Make sure “ISAPI Extensions”, “ISAPI Filters” and ”CGI” are checked. To verify go to Control Panel -> Programs and Features -> Turn on Windows Features. Check “Internet Information Services” inside that you will find all these 3 modules.
- Apache Tomcat 9+ is installed.
Testing Environment :
-
Operating System we have tested on are :
- Windows 8.1, 64-bit OS, x64-based processor.
- Windows 10, 64-bit OS, x64-based processor.
Introduction:
Helical Insight is Java based application. Since IIS server doesn’t host Java applications, there are couple of methods to configure IIS server in order to access applications which are hosted inside apache-tomcat. This document contains detailed steps of one of the method on how to integrate Helical Insight application which is deployed in apache-tomcat with Microsoft IIS server using ISAPI redirector.
Below are the steps to follow :
Configure for ISAPI Redirector :
1. Create a directory with name “isapi” inside Apache Tomcat folder. Refer below screenshot :
2. Allow the IIS process to create the ISAPI redirector log file. Modify the path as necessary if the log file is to be written to a different directory. Enter the following at a command prompt:
Note : Open command prompt with Administrator privilege.
Icacls.exe”Your relative Path of isapi folder” /grant “IIS APPPOOL\DefaultAppPool”:(OI)(CI)M
Example : icacls.exe”C:\apache-tomcat-9.0.7\isapi” /grant “IIS APPPOOL\DefaultAppPool”:(OI)(CI)M
3.Download the appropriate (32 bit or 64 bit) isapi_redirect.dll for your operating system and place it in “isapi” folder.
Example : C:\apache-tomcat-9.0.7\isapi\isapi_redirect.dll
You can download isapi_redirect.dll from this URL :
If 32 bit :
https://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.31/
If 64 bit :
https://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.31/amd64/
4.Create “isapi_redirect.properties” file inside “isapi” folder. The content of this properties file will be as below :
Example : C:\apache-tomcat-9.0.7\isapi\isapi_redirect.properties
Note : Modify the paths according to your paths.
5. Create “workers.properties” file to configure the tomcat instance that requests will be passed to. The content of this file will be as below :
Example : C:\apache-tomcat-9.0.7\isapi\workers.properties
Note : Modify details according to your details if necessary.
6. Create “uriworkermap.properties” file to configure which requests will be passed to tomcat. The content of this file will be as below :
Example : C:\apache-tomcat-9.0.7\isapi\uriworkermap.properties
7. Open IIS Manager. Add a new virtual directory to your IIS web site. In a clean install, this will be the “Default Web Site” . Keep the name of virtual directory as “jakarta”. Its physical path should be the directory where you placed “isapi_redirect.dll”.
8. Select the newly created virtual directory in the management console and then double-click Handler Mappings. Select the (currently disabled) ISAPI-dll entry and then click Edit Feature Permissions in the action panel. In the dialog box that opens, select Execute so all three permissions are selected. Click OK and ISAPI-dll should now be in the enabled state.
9. Again using the IIS management console, add the ISAPI redirector as a filter to your web site. Select your web site and then double-click ISAPI Filters. From the action panel, click Add. For the filter name use tomcat and the executable should be the full path to isapi_redirect.dll. Once configured, click OK.
10. Still using the IIS management console, configure the ISAPI redirector as allowed. Select your server (not the web site) and then double-click on ISAPI and CGI Restrictions. From the action panel, click Add. Select the isapi_redirect.dll, add a descripion (e.g. tomcat) and select the Allow extension path to execute and then click OK.
11. Enable directory browsing for Virtual Directory.
a)Select the virtual directory node (in this case “jakarta”)
b)Double click on “Directory Browsing” icon.
c)Click “Enable” in actions panel.
12. Edit anonymous authentication credentials :
a)Select the virtual directory node.
b)Double click the “Authentication” icon.
c)Click to select “Anonymous Authentication” item.
d)Click “Edit” in actions panel.
e)A dialogue will prompt out.
f)Checked “Application Pool Identity” and press OK button to commit changes.
13. Enable ISAPI modules
a)Click on the root node (your server)
b)Double click on “ISAPI and CGI Restrictions” icon.
c)Click “Edit Feature Setting” in actions panel.
d)Check “Allow unspecified ISAPI modules” and “Allow unspecified CGI modules”options. This option allow any ISAPI dll to be executed under IIS. If you don’t use this option, you will need to specify a list of ISAPI DLLs explicitly.
14. Edit permission for virtual directory
a)Select the virtual directory node (in this case “jakarta”)
b)Right click on the node and click “Edit Permission” of popup menu.
c)A properties dialog prompt out.
d)Switch to “Security” page.
e)Click edit button to show permission dialog.
f)Add “IIS_IUSRS” into the permission list.
15. Enable 32 bits ISAPI DLL on IIS
This is only require if you are using IIS7 x64 and would like to run 32 bits ISAPI DLL on the IIS. If your ISAPI DLL and IIS7 is both x86 or both x64, you may skip this step.
a)Click “Application Pools” node.
b)Click “DefaultAppPool” item.
c)Click “Advanced Settings” from actions panel.
d)Set “Enable 32-bits Application” to True
e)Click OK button to commit changes.
f)Right click on “DefaultAppPool” item and click “Recycle” item.
16. Restart IIS (stop + start IIS service)
17. Try accessing application on tomcat.
Example : http://localhost/hi-ee/
For more detailed information, refer below blogs :
References :
1.https://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
2.http://chee-yang.blogspot.in/2009/10/configure-windows-7-iis7-for-isapi-dll.html