Coexistence of IIS and tomcat in Windows

Source: Internet
Author: User
Coexistence of IIS and tomcat

Recently, I used. Net to develop a set of webProgram, Using port 8003, When I deploy it to a customer, what they run is
Tomcat, port 80 is used. I also need port 80 because China Netcom cannot resolve the port.
I have never encountered this problem before. I went to the Internet to find information. Now I can summarize it:

If Apache (using Apache + Tomcat) is installed on the server, IIS and Apache cannot use the same port 80, because both IIS and Apache require an exclusive port, the common practice is to use the ISAPI of Tomcat to implement communication between IIS and tomcat. The procedure is as follows (* the system is configured as Windows2003 SERVER + IIS6 + tomcat5.0.14 ):

First goHttp://apache.linuxforum.net/dist/jakarta/tomcat-connectors/jk2/binaries/win32/jakarta-tomcat-connectors-jk2.0.4-win32-IIS.zipDownload JK2, and JK2 is responsible for communication between IIS and tomcat. After unzipping, get isapi_redirector2.dll.

Next, create a workers2.properties file under the conf directory under the tomcat installation directory, copy the following configuration information, and save it. Note that the path in file = "..." must be "/".

[SHM]

File = C:/tomcat/logs/jk2.log

Size = 1048576

# Replace all localhost and 8009 with your own IP address and port.

[Channel. Socket: localhost: 8009]

Port = 8009

Host = localhost

# Define the worker

[Ajp13: localhost: 8009]

Channel = channel. Socket: localhost: 8009

# URI Mapping

[URI:/*. jsp]

[URI:/web/*]

Worker = ajp13: localhost: 8009

# Define the worker

[Status: Status]

# URI Mapping

[URI:/jkstatus/*]

Worker = Status: Status

Edit the jk2.properties file and check whether the following sentence exists:

Request. tomcatauthentication = false

Next, modify the Registry. You can create a new IIS. reg file, copy the following section, save it, and double-click IIS. reg to import the information to the Registry. (Note: Change the involved Tomcat path to your Tomcat path)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Apache Software Foundation \ Jakarta ISAPI

Redirector/2.0]

"Serverroot" = "C: \ Tomcat"

"Extensionuri" = "/Jakarta/isapi_redirector2.dll"

"Workersfile" = "C: \ Tomcat \ conf \ workers2.properties"

"Loglevel" = "info"

open "my computer-> Control Panel-> Administrative Tools-> Internet Information Service Manager ", select the default website in "website" (the default website is assumed to point to c: \ Web), right-click it, and select "attribute ", in the displayed dialog box, select "ISAPI filter", click "add", enter Jakarta as the filter name, and enter the absolute path of your isapi_redirector2.dll In the executable file. Click "OK" to close the property page. Right-click "default website" and choose "New"> "virtual directory". Enter Jakarta as the alias. Next, select "path" as the directory where your isapi_redirector2.dll is stored. My directory is C: \ Tomcat \ IIS, next step. Remember to tick the "execute" item in the permission section, right-click "Web Service extension" in "website" of "Internet Information Service Manager" and choose "Add a new Web Service extension ", in the pop-up box, set the extension to Tomcat (which doesn't matter), select "add" for "requested files", find your isapi_redirector2.dll, and click "OK ". The "set extension status to allow" option is also checked, and the configuration is complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.