Win2000Server IIS and Tomcat5 multi-site configuration

xiaoxiao2021-03-06  46

Configuration requirements: IIS (Win2000 Server self-contained), Java 2 SDK 1.4.2 (or higher), Tomcat Web Server Connector, Tomcat 5.0.24 (or higher) Preparation, Java 2 SDK 1.4.2 ( Or higher version) 1, www.java.sun.com/downloads / download, select 2, Java 2 Platform, Standard Edition (J2SE) 3, select All Platforms 4 in the drop-down list box, J2se V 1.4.2_04 SDK Includes the JVM Technology Under Select 5, Download J2se SDK 6, select Accept After selecting the ACCEPT Download Windows Offline Installation, Multi-Language (J2SDK-1_4_2_04-Windows-i586-P.EXE, 49.36 MB) version 2, Tomcat 5.0.24 (or Higher version) 1, http://jakarta.apache.org/site/binindex.cgi Download 2, select Binaries 3 in Downloads, select 5.0.25 EXE PGP MD5 in Tomcat 5.0.25 Keys download three, Tomcat Web Server connector 1, http://jakarta.apache.org/site/binindex.cgi download 2, select Binaries 3 in Downloads, select 4 in Tomcat Web Server Connectors Keys, JK 2 JK 2 Binary Releases 5, Index Of / Dist / Jakarta / Tomcat-Connectors / JK2 / BINARIES interface, select Win32 / then select Download Jakarta-Tomcat-Connectors-jk2.0.4-win32-iis.zip Note that the file name displayed by this directory list is truncated, so you need to observe The prompt in the browser status bar, confirm that the file you prepare to download should be installed with /"...iis.zip/ ", Java 2 SDK runs J2SDK-1_4_2_04-windows-i586-p.exe follows the prompt Install (you can change the installation path to your habit). Here, D: // JDK (JDK has a new folder for yourself), Tomcat 5 runs Jakarta-Tomcat-5.0.24.exe follows the prompt installation (you can change to other paths). Here, D: Tomcat 5.0 is selected for your own new folder) Select the JDK path of the local machine. In general, the installation file will automatically search and display. If there is no correct display, you can also change successfully. The program will prompt to start Tomcat and view the ReadMe document. Note: Before starting Tomcat, you must determine that the system has no other service already occupies 8080 port (Tomcat default port) and 8009 port (Tomcat / 'S AJP13 connector port) Tomcat is started after normal startup, pays up the icon at system bar Note: Tomcat5.0 or less The version must be set up, Tomcat5.0 or more can not be set up, Tomcat JK2 IIS connector decompress jakarta-tomcat-connectors-jk2.0.4-win32-iis.zip Get three folders, enter // BIN // can be seen in Isapi_Redirector2.dll. Cut / copy ISAPI_REDIRECTOR2.DLL file to Tomcat / 's bin // directory New Directory Win32 // i386 / / and paste ISAPI_Redirector2.dll. Remember this path, it will be used when you configure IIS.

This path is not the system requirements, can change! Now you can delete the Jakarta-Tomcat-Connector-JK2.0.4-Win32-IIS directory, which is no longer available. In actually in Jakarta-Tomcat-Connectors-jk2.0.4-win32-iis.zip, we only use ISAPI_Redirector2.dll a file settings. Tomcat enters the Tomcat / 's conf // folder. To support JK2 connector, you You may need to modify the JK2.Properties file. Most cases reserved the default state of this file, and the multiple configuration procedures have not modified this file. ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED ## WHEN YOU EDIT THE FILE. ## COMMENTS WILL BE _LOST_ ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. # Set the desired handler list # handler.list = apr, request, channelJni # www.knowsky.com # Override the default port for the socketChannel # channelSocket.port = 8019 # default: # channelUnix.file = $ {jkHome} /work/jk2.socket # Just to check if the the config is working # shm.file = $ {jkHome} /work/jk2.shm # In order to enable jni use any channelJni directive # channelJni.disabled = 0 # And one of the following directives: # apr.jniModeSo = / opt / apache2 / modules / mod_jk2.so # If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 # apr.jniModeSo = inprocess request.tomcatAuthentication = false setting environment variables tomcat_home. Point to Tomcat installation directory D: // Tomcat 5.0. Note that the system has a Java_Home environment variable to create workers2.properties to D: // Tomcat 5.0 // confes.

The WORKERS2.PROPERTIES content file is as follows: [SHM] file = / "d: / tomcat 5.0 / logs / jk2.shm /" size = 1048576 # Example Socket Channel, Override port and host. [Channel. Socket: localhost: 8009] Port = 8009 Host = 127.0.0.1 # define the worker [AJP13: localhost: 8009] channel = channel.socket: localhost: 8009 # uri mapping [uri: / *. Jsp] [URI: / servlet / *] worker = ajp13: Localhost: 8009 Third, Tomcat IIS Connector You have placed Isapi_Redirector2.dll under your path, this example is D: // Tomcat 5.0 // bin // Win32 // i386 now need to add some necessary registration information to registration Table, Redirector is read when called IIS. Establish a .reg file Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE // SOFTWARE // Apache Software Foundation // Jakarta Isapi Redirector // 2.0] / "workersFile /" = / "d: Tomcat 5.0confworkers2.properties/" / "extensionUri / "= /" = "/" = / "/" loglevel / "= /" debug / "/" serverroot / "= /" d: tomcat 5.0 / "writes the above text in Notepad, and saves Reg.reg Double-click .reg file, the content in the registry will add success hkey_local_machine // software // Apache Software Foundation // Jakarta Isapi Redirector // 2.0 can be seen in. Fourth, formulate multiple sites for Tomcat. Newly built two folders D: // Tomcat1 and D: // Tomcat2. Establish a root directory again in the two folders. Notepad opens the D: Tomcat 5.0//conf//server.xml file. Find the label in file server.xml; newly built as follows after the label: Tomcat1.com/"> www.tomcat1.com/ "AppBase = /" D: // Tomcat1 / "> Tomcat2.com/">www.tomcat2 .com / "appbase = /" d: // Tomcat2 / "> Mainly new two virtual host tomcat1.com"> www.tomcat1.com and tomcat2.com "> www.tomcat2.com. The site directory is D: // Tomcat1 and D: // Tomcat2. D: // Tomcat1 // root and d: // Tomcat2 // root. They are the main directory of two sites. Log files and access log files are also established. 5. Open the map of Tomcat / servlet / *. Notepad opens the D: // Tomcat 5.0 // conf //web.xml file. Remove the INVOKER Org.Apache.catalina.Servlets.invokerServlet Debug 0 2 and Invoker / Servlet / * Remove the annotation of the two code segments to take effect.

转载请注明原文地址:https://www.9cbs.com/read-79553.html

New Post(0)