Tomcat 5.5.x configuration highlights

xiaoxiao2021-03-06  18

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:

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

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 master password

(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">

8. Prohibit the file directory list,

Modify Jakarta-Tomcat-5.5.x / conf / web.xml, set the listing to false

Default

org.apache.catalina.servlets.defaultServlet

debug

0

Listings

True

1

9. Specify your own javaencoding

(reference

http://gceclub.sun.com.cn/staticcontent/html/sunone/app7/app7-dg-webapp/ch6/ch6-4.html)

JSP

org.apache.jasper.servlet.jspservlet

fork

false

javaEncoding

GB18030

XpoweredBy

True

3

10. Add RAR, ISO, etc. MIME-TYPE mapping

Avoid direct opening directly in the browser.

MHT

TEXT / X-MHT

RAR

Application / OCTET-stream

ISO

Application / OCTET-stream

APE

Application / OCTET-stream

RMVB

Application / OCTET-stream

ICO

image / x-icon

10.1 Setting up the HTML static page

htm text / html; charSet = GB2312 HTML text / html; charSet = GB2312

11. Add Welcome-File-List and adjust the order.

Index.jsp

Index.html

index.htm

default.html

default.htm

default.jsp

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

New Post(0)