Integration of IIS and tomcat

Source: Internet
Author: User
Http://archive.apache.org/dist/tomcat/tomcat-conne...
 
Http://archive.apache.org/dist/tomcat/tomcat-conne...
 
 
It took a long time to complete IIS6 and tomcat integration. Now, I will post the steps for your reference, which frees you from getting involved on Google and debugging again and again. Start! First, describe my system. The Windows 2003 Server Chinese Version IIS6 tomcat5.5, JDK 5.0 installation directory is C: JDK, and tomcat installation directory is C:/tomcat, the environment variables java_home and tomcat_home have been set and point to their respective installation directories. (Note: Modify the Tomcat path involved in all the files to your own Tomcat path.) I will not talk about the installation of Tomcat 5 and IIS6. There are many documents on the Internet, assume that Tomcat 5 and IIS6 have been installed and can run independently. The default websites of both are directed to the C:/web directory. Now what we need to do is download jakarta-tomcat-connectors-jk2.0.2-win32-iis.zip to download JK2, which is responsible for the communication between IIS and tomcat. After decoding, we get isapi_redirector2.dll, and I put it in C: /tomcat5.5/IIS (directory casually ). Next, create a workers2.properties file under the conf directory under the tomcat installation directory, and copy the following section to save it. Note that the path in file = "..." must be! [SHM] file = C:/tomcat5.5/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: Edit jk2.properties after status File to confirm whether there is such a sentence: request. tomcatauthentication = false next, edit the registry and directly create an IIS. reg file, copy the following section, save it, and double-click IIS. reg imports information into the registry. (Note: Change the involved Tomcat path to your Tomcat path) Windows Registry Editor Version 5.00 [hkey_local_machinesoftwareapache software foundationjakarta ISAPI redirector2.0] "serverroot" = "C: /tomcat "" extensionuri "="/Jakarta/isapi_redirector2.dll "" workersfile "=" C: /tomcat/CONF/workers2.properties "" loglevel "=" info ", and then open" my computer-> Control Panel-> management 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" and click "add ". ", Set the Filter Name to Jakarta, and fill in 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: /atat5.5/IIS. Next, remember to tick the "execute" item in the permission. If you are using iis5, you can end it here, but IIS6 is not complete yet. Continue. 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 ". "Set the extension status to allow" is also checked, OK. Now, the configuration is complete. Now we start Tomcat 5, and then Net start w3svc starts IIS6. Type http: // localhost: 8080/Hello. jsp (this file is stored in C:/Web! Then let's take a look at http: // localhost/Hello. jsp. If the execution results are the same, congratulations, integration is successful! However, it may not work at this time. You should confirm the following points: 1. in your "Internet Information Service Manager"-> "website"-> "default website"-> "properties"-> "ISAPI filter", is Jakarta a green arrow up? If the configuration is red, check whether your previous configuration is missing or you have written something wrong, and reconfigure it again. 2. check whether there are tools in the commonlib directory under your tomcat installation directory. JAR file (tomcat5 seems to exist, but it does not exist in tomcat4. This is rarely mentioned in online documents, which causes my configuration to fail multiple times ), if no, copy one from JDK Lib. 3. The directory to which IIS points should be the same as the directory to which Tomcat points. Otherwise, the image and other resource files cannot be found. (This does not affect execution !) 4. IIS6 should also be set to iis5 Isolation Mode, "Internet Information Service Manager"-> "website"-> "attribute"-> "service ", check "Run WWW Service in iis5.0 Isolation Mode. However, it can be used normally without being checked. If the configuration is not successful, you can try this. ------------------------------------------------------------------- How to set up a VM on an iis vm. a vm runs several websites on a server and provides services such as web, FTP, and mail. This topic describes Web Service virtual host settings. There are two ways to implement a VM: IP-based and host name-based. IP-based method: first, bind multiple IP addresses to the server, configure the Web server, and bind multiple websites to different IP addresses. Access different IP addresses to view different websites. Host Name-Based Method: first, set a records for multiple domain names so that they are resolved to the same IP address, that is, the same server. Then, configure the Web server on the server, add multiple websites, and set a host name for each website. The HTTP request contains the host name information. When the Web server receives an access request, it can access different websites based on different host names. The basic IP address method is commonly used in LAN, and the host name-based method is commonly used in Internet. The following describes how to set the host name-based virtual host based on two common Web servers, IIS and Apache. To set up a VM, add multiple domain names to the dynamic domain name client. The purpose of this step is to resolve these domain names to the same server. (Note: You can add multiple domain names to the public network client and the truehost client of the Intranet Professional Edition. The intranet Standard Edition does not support multiple domain names ). Add a domain name to the Web server (such as IIS and Apache) of your machine to configure the VM. For iis vm settings, choose Control Panel> Administrative Tools> Internet Service Manager> default web site ". Right-click the "Default web site" and choose "New"> "Site ". Click "Next ". Enter the site description, for example, site 1 ". Click "Next ". Enter the domain name on "Host header of the site", for example, "abc.aspxuexi.com ". Click "Next ". Specify the root directory path of the site in the path. Click "Next ". Select the appropriate permission in the permission. Click "Next. If you configure a virtual host with a top-level domain name, for example, enter "abc.com" in the Host Header in step 1 above, and you also want to use "www.abc.com" for access. The procedure is as follows: Right-click site 1 in Internet Service Manager and select Properties ". Click "advanced" on the right of the IP address ". Click "add", enter the port number (usually 80), and then enter the host header name "www.abc.com ". If you want to add multiple sites, repeat the preceding steps.? Tid = 624iis VM settings Reference URL: http://aspxuexi.com/iis/iis/2006-8-5/738.htm

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.