IIS6 integration of one or more Tomcat methods under WIN2003 _tomcat

Source: Internet
Author: User
Tags tomcat server

Requirements: The client's server is maintained by me and his own technicians, the server has more than one web in operation, ASP, PHP, Java mixed all have, the original web architecture is Nginx+apache+iis+x*tomcat, but the customer's technicians often to some small site [ ASP, PHP to adjust, such as adding or deleting sites or to do pseudo static rules, and so on, and the problem comes out, the customer technician is only familiar with the IIS configuration, the configuration of Nginx, Apache these are unfamiliar, and these web sites also no traffic, so basically do not consider the performance of this piece. So finally decided to replace the full iis+x*tomcat,asp, PHP is all done by IIS. Since the IIS configuration is much more integrated with PHP, I only record the integration of IIS with Java server Tomcat.

I don't know if I can explain what I mean by this picture, in a word, the URI request in the site with the end of the EJF suffix is forwarded to the back-end Java server Tomcat for processing. Well, no more nonsense to say, ready to start the real station.

1. The first step is to download the Isapi_redirect.dll file, the latest version is 1.2.31, download the address: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/ binaries/Note the version of the download with your OS relationship, my server is using the win 2003 32-bit version. So you should download the Win32 version. Put the downloaded Isapi_redirect-1.2.31.dll in the Jakarta directory under the TOMCAT7 root directory, and you can also leave it at random in other directories.

2, in the Jakarta directory at the same time to establish three documents: Install.reg, Uriworkermap.properties, Workers.properties, do not import install.reg this file into the registry when the configuration in these three files is not fully aligned.

Install.reg File Contents:

Copy Code code as follows:

[-hkey_local_machine\software\apache SOFTWARE Foundation\jakarta Isapi redirector\1.0]
[Hkey_local_machine\software\apache SOFTWARE Foundation\jakarta Isapi redirector\1.0]
"Extension_uri" = "/jakarta/isapi_redirect-1.2.31.dll"
"Log_file" = "D:\\usr\\local\\lyservice\\tomcat\\tomcat7\\jakarta\\logs\\isapi.log"
"Log_level" = "Error"
"Worker_file" = "d:\\usr\\local\\lyservice\\tomcat\\tomcat7\\jakarta\\workers.properties"
"Worker_mount_file" = "d:\\usr\\local\\lyservice\\tomcat\\tomcat7\\jakarta\\uriworkermap.properties"

Uriworkermap.properties File Contents

#所有请求后缀为ejf的URI都拦截转发给对应的后端JAVA服务器来处理

Copy Code code as follows:

/en.dgdy.cc/*.ejf=worker1
/cn.dgdy.cc/*.ejf=worker2

3. Here, the configuration processing for Tomcat is configured, followed by the need to configure in IIS, first in IIS to establish the corresponding two Web sites, the corresponding directory should also point to the same folder as your Tomcat configuration virtual host. There is no difference between establishing a Web site in IIS and creating another site.




4, the next is the more important configuration, respectively, for these two sites to create a virtual directory <jakarta>. Note that the path to this virtual directory must be tomcat7\jakarta this directory, and in this directory must have the first three configuration files we have configured and that DLL file.



5. Right----> Property---> Home directory on the IIS en.dgdy.cc site, set execution permissions to scripts and executables.

Then click on the ISAPI filter to open the following window and configure it, be sure to note that the executable file reference location must be the same as the above virtual directory and registry files configured directory, remember to remember.

6. Add a new Web service extension

The extension here can not be arbitrarily changed, the required files must also be the corresponding directory of the DLL file, and must be the following "Set extension status to allow" on the hook. Remember to remember.

7, OK, for the en.dgdy.cc site in IIS configuration is completed, the previous steps, the cn.dgdy.cc in IIS configuration is also configured, and Install.reg this registry file import into the registry. Never forget this, if you have finished configuring the properties panel of these two sites to switch to the ISAPI Filter tab panel again, if you see a green up arrow, the configuration is correct, or if red, the configuration is problematic or you need to restart the IIS server. As shown in the following figure.

8, finally, if all become green up ARROW, then we will verify that, such as access to http://cn.dgdy.cc/html/callme.html?act=contact this page if the message verification code can come out, it indicates that the configuration was successful.

Last words: If you follow the above configuration to ensure that the stitch are not wrong, but access to the corresponding dynamic pages can not be forwarded to the back-end Java server to deal with, then I can think of the possibility that you have one of the following errors.

A), the server OS is 64 bits, but you download the 32-bit DLL class library file, otherwise ...

b, test the direct plus port number to connect your Tomcat server to see if you can access the normal

c), importing Install.reg files prematurely and the JDK or DLL class library file directory in the file is not set to

D), RP problem ...

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.