Ptomcat5.5.x Configuration Record.
1. Download:
http://www.eu.apache.org/dist/jakarta/tomcat-5/5/5/5/5/5/
http://www.apache.org/dist/jakarta/tomcat-5/v5.5.x/bin/jakarta-tomcat-5.5.x-admin.zip
http://www.apache.org/dist/jakarta/tomcat-5/v5.5.x/bin/jakarta-tomcat-5.5.x-compat.zip
http://www.apache.org/dist/jakarta/tomcat-5/v5.5.x/bin/jakarta-tomcat-5.5.x.zip
http://www.apache.org/dist/jakarta/tomcat-5/v5.5.x/bin/jakarta-tomcat-5.5.x-deployer.zip
Put
Jakarta-Tomcat-5.5.x.zip
with
Jakarta-tomcat-5.5.x-compat.zip
with
Jakarta-tomcat-5.5.x-admin.zip
(Tomcat default is no built-in Admin module)
Tomcat's Administration Web Application IS No Longer Installed by Default. Download and Install The "admin" package to use it.)
They are decompressed below the same directory. For example: d: /jakarta-tomcat-5.5.x/
(If you use JDK1.4, you need it.
Compat.zip can be free from JDK1.5. )
2. Modify Jakarta-Tomcat-5.5.x / conf / tomcat-users.xml.
Add administrator account lizongbo, password is lizongbopass.
The new XML is as follows:
XML Version = '1.0' encoding = 'UTF-8'?>
tomcat-users>
3. Modify Jakarta-Tomcat-5.5.x / conf / server.xml to resolve the code problem.
(Add uRiencoding parameters to Connector, refer to
http://blog.9cbs.net/darkxie/archive/2004/10/25/tomcatapp.aspx (can be set to GB18030)
Maxthreads = "150" MINSPARETHREADS = "25" maxsparethreads = "75" Enablelookups = "false" redirectport = "8443" acceptcount = "200" ConnectionTIMEOUT = "20000" disableuploadtimeout = "true" uriencoding = "gbk" Compression = "on" compressionminsize = "2048" NocompressionUseragents = "Gozilla, Traviata" CompressableMimeType = "text / html, text / xml" /> Enablelookups = "false" redirectport = "8443" protocol = "ajp / 1.3" uriencoding = "gbk" /> 4. Enable support Gzip compression. ( http://www.linuxaid.com.cn/forum/showdoc.jsp?l=1&i=81169) Add the following properties Compression = "on" CompressionminSize = "2048" NocompressionUseragents = "Gozilla, Traviata" CompressableMimeType = "text / html, text / xml" 5. Set the virtual host. Create a folder vhost / www.mydomain.com in Jakarta-Tomcat-5.5.x /. Then modify jakarta-tomcat-5.5.x / conf / server.xml Host> Host> Engine> 6. Add database driver, update mail.jar and actiovation.jar Copy MySQL-Connector-Java-3.0.16-Ga-bin.jar, pg74.215.jdbc3.jar to Jakarta-Tomcat-5.5.x / Common / LIB / There is also a mail.jar, Javamail 1.3.2, JAF-1_0_2 Activation.jar MSSQL 2000 JDBC SP3, MSBase.jar, Msutil, Jar, MSSQLServer.jar7. Configuring SSL reference Http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html D: /J2SDK1.4.2_06/bin>% java_home% / bin / keytool -genkey -alias tomcat -keyalg rsa Enter keystore password: lizongbossl What is your name and last name? [Tomcat5.5.x]: Tomcat5.5.x What is your organizational unit name? [JAKARTA]: JAKARTA What is your organization name? [Apache]: Apache What is your city or region name? [hzcity]: hzcity What is your state or provincial name? [GDP]: GDP What is the two-letter country code in this unit? [CN]: CN CN = Tomcat5.5.x, ou = jakarta, o = apache, l = hzcity, ST = GDP, c = CN correct? [No]: Y Enter (If you pass the keystore password, press Enter): (The password must be consistent, so go directly to the car) Then then copy UserHome (for example: c: / documents and settings / lizongbo /). KeyStore Tomcat's conf / directory. (For example: d: /jakarta-tomcat-5.5.x/conf/.keystore) Configure jakarta-tomcat-5.5.x / conf / server.xml Plus Maxthreads = "150" MINSPARETHREADS = "25" maxsparethreads = "75" Enablelookups = "false" disableuploadtimeout = "true" AcceptCount = "100" scheme = "https" secure = "true" ClientAuth = "false" sslprotocol = "tls" KeyStorefile = "conf / .keystore" KeyStorePass = "lizongbossl"> Connectionor> 8. Prohibit the file directory list, Modify Jakarta-Tomcat-5.5.x / conf / web.xml, set the listing to false init-param> servlet> 9. Specify your own javaencoding (reference http://gceclub.sun.com.cn/staticcontent/html/sunone/app7/app7-dg-webapp/ch6/ch6-4.html) init-param> init-param> init-param> servlet> 10. Add RAR, ISO, etc. MIME-TYPE mapping Avoid direct opening directly in the browser. mime-mapping> mime-mapping> mime-mapping> mime-mapping> mime-mapping> mime-mapping> 10.1 Setting up the HTML static page 11. Add Welcome-File-List and adjust the order. welcome-file-list>