serverxml文件.docx

上传人:b****7 文档编号:9402098 上传时间:2023-02-04 格式:DOCX 页数:60 大小:23.22KB
下载 相关 举报
serverxml文件.docx_第1页
第1页 / 共60页
serverxml文件.docx_第2页
第2页 / 共60页
serverxml文件.docx_第3页
第3页 / 共60页
serverxml文件.docx_第4页
第4页 / 共60页
serverxml文件.docx_第5页
第5页 / 共60页
点击查看更多>>
下载资源
资源描述

serverxml文件.docx

《serverxml文件.docx》由会员分享,可在线阅读,更多相关《serverxml文件.docx(60页珍藏版)》请在冰豆网上搜索。

serverxml文件.docx

serverxml文件

--ExampleServerConfigurationFile-->

--Notethatcomponentelementsarenestedcorrespondingtotheir

parent-childrelationshipswitheachother-->

--A"Server"isasingletonelementthatrepresentstheentireJVM,

whichmaycontainoneormore"Service"instances.TheServer

listensforashutdowncommandontheindicatedport.

Note:

A"Server"isnotitselfa"Container",soyoumaynot

definesubcomponentssuchas"Valves"or"Loggers"atthislevel.

-->

--CommenttheseentriesouttodisableJMXMBeanssupport-->

--Youmayalsoconfigurecustomcomponents(e.g.Valves/Realms)by

includingyourownmbean-descriptorfile(s),andsettingthe

"descriptors"attributetopointtoa';'seperatedlistofpaths

(intheClassLoadersense)offilestoaddtothedefaultlist.

e.g.descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"

-->

debug="0"/>

debug="0"/>

--GlobalJNDIresources-->

--Testentryfordemonstrationpurposes-->

--Editableuserdatabasethatcanalsobeusedby

UserDatabaseRealmtoauthenticateusers-->

type="org.apache.catalina.UserDatabase"

description="Userdatabasethatcanbeupdatedandsaved">

factory

org.apache.catalina.users.MemoryUserDatabaseFactory

pathname

conf/tomcat-users.xml

--A"Service"isacollectionofoneormore"Connectors"thatshare

asingle"Container"(andthereforethewebapplicationsvisible

withinthatContainer).Normally,thatContainerisan"Engine",

butthisisnotrequired.

Note:

A"Service"isnotitselfa"Container",soyoumaynot

definesubcomponentssuchas"Valves"or"Loggers"atthislevel.

-->

--DefinetheTomcatStand-AloneService-->

--A"Connector"representsanendpointbywhichrequestsarereceived

andresponsesarereturned.EachConnectorpassesrequestsontothe

associated"Container"(normallyanEngine)forprocessing.

Bydefault,anon-SSLHTTP/1.1Connectorisestablishedonport8080.

YoucanalsoenableanSSLHTTP/1.1Connectoronport8443by

followingtheinstructionsbelowanduncommentingthesecondConnector

entry.SSLsupportrequiresthefollowingsteps(seetheSSLConfig

HOWTOintheTomcat5documentationbundleformoredetailed

instructions):

*IfyourJDKversion1.3orprior,downloadandinstallJSSE1.0.2or

later,andputtheJARfilesinto"$JAVA_HOME/jre/lib/ext".

*Execute:

%JAVA_HOME%\bin\keytool-genkey-aliastomcat-keyalgRSA(Windows)

$JAVA_HOME/bin/keytool-genkey-aliastomcat-keyalgRSA(Unix)

withapasswordvalueof"changeit"forboththecertificateand

thekeystoreitself.

Bydefault,DNSlookupsareenabledwhenawebapplicationcalls

request.getRemoteHost().Thiscanhaveanadverseimpacton

performance,soyoucandisableitbysettingthe

"enableLookups"attributeto"false".WhenDNSlookupsaredisabled,

request.getRemoteHost()willreturntheStringversionofthe

IPaddressoftheremoteclient.

-->

--Defineanon-SSLCoyoteHTTP/1.1Connectoronport8080-->

maxThreads="150"minSpareThreads="25"maxSpareThreads="75"

enableLookups="false"redirectPort="8443"acceptCount="500"

debug="0"connectionTimeout="20000"

disableUploadTimeout="true"/>

--Note:

Todisableconnectiontimeouts,setconnectionTimeoutvalue

to0-->

--Note:

Tousegzipcompressionyoucouldsetthefollowingproperties:

compression="on"

compressionMinSize="2048"

noCompressionUserAgents="gozilla,traviata"

compressableMimeType="text/html,text/xml"

-->

--DefineaSSLCoyoteHTTP/1.1Connectoronport8443-->

--

maxThreads="150"minSpareThreads="25"maxSpareThreads="75"

enableLookups="false"disableUploadTimeout="true"

acceptCount="500"debug="0"scheme="https"secure="true"

clientAuth="false"sslProtocol="TLS"/>

-->

--DefineaCoyote/JK2AJP1.3Connectoronport8009-->

enableLookups="false"redirectPort="8443"debug="0"

protocol="AJP/1.3"/>

--DefineaProxiedHTTP/1.1Connectoronport8082-->

--Seeproxydocumentationformoreinformationaboutusingthis.-->

--

maxThreads="150"minSpareThreads="25"maxSpareThreads="75"

enableLookups="false"

acceptCount="500"debug="0"connectionTimeout="20000"

proxyPort="80"disableUploadTimeout="true"/>

-->

--AnEnginerepresentstheentrypoint(withinCatalina)thatprocesses

everyrequest.TheEngineimplementationforTomcatstandalone

analyzestheHTTPheadersincludedwiththerequest,andpassesthem

ontotheappropriateHost(virtualhost).-->

--YoushouldsetjvmRoutetosupportload-balancingviaJK/JK2ie:

-->

--Definethetoplevelcontainerinourcontainerhierarchy-->

--Therequestdumpervalvedumpsusefuldebugginginformationabout

therequestheadersandcookiesthatwerereceived,andtheresponse

headersandcookiesthatweresent,forallrequestsreceivedby

thisinstanceofTomcat.Ifyoucareonlyaboutrequeststoa

particularvirtualhost,oraparticularapplication,nestthis

elementinsidethecorrespondingorentryinstead.

ForasimilarmechanismthatisportabletoallServlet2.4

containers,checkoutthe"RequestDumperFilter"Filterinthe

exampleapplication(thesourceforthisfiltermaybefoundin

"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").

Requestdumpingisdisabledbydefault.Uncommentthefollowing

elementtoenableit.-->

--

-->

--Globalloggerunlessoverriddenatlowerlevels-->

prefix="catalina_log."suffix=".txt"

timestamp="true"/>

--BecausethisRealmishere,aninstancewillbesharedglobally-->

--ThisRealmusestheUserDatabaseconfiguredintheglobalJNDI

resourcesunderthekey"UserDatabase".Anyedits

thatareperformedagainstthisUserDatabaseareimmediately

availableforusebytheRealm.-->

debug="0"resourceName="UserDatabase"/>

--Commentouttheoldrealmbutleaveherefornowincasewe

needtogobackquickly-->

--

-->

--ReplacetheaboveRealmwithoneofthefollowingtogetaRealm

storedinadatabaseandaccessedviaJDBC-->

--

driverName="org.gjt.mm.mysql.Driver"

connectionURL="jdbc:

mysql:

//localhost/authority"

connectionName="test"connectionPassword="test"

userTable="users"userNameCol="user_name"userCredCol="user_pass"

userRoleTable="user_roles"roleNameCol="role_name"/>

-->

--

driverName="oracle.jdbc.driver.OracleDriver"

connectionURL="jdbc:

oracle:

thin:

@ntserver:

1521:

ORCL"

connectionName="scott"connectionPassword="tiger"

userTable="users"userNameCol="user_name"userCredCol="user_pass"

userRoleTable="user_roles"roleNameCol="role_name"/>

-->

--

driverName="sun.jdbc.odbc.JdbcOdbcDriver"

connectionURL="jdbc:

odbc:

CATALINA"

userTable="users"userNameCol="user_name"userCredCol="user_pass"

userRoleTable="user_roles"roleNameCol="role_name"/>

-->

--Definethedefaultvirtualhost

Note:

XMLSchemavalidationwillnotworkwithXerces2.2.

-->

unpackWARs="true"autoDeploy="true"

xmlValidation="false"xmlNamespaceAware="false">

--Definesaclusterforthisnode,

Bydefiningthiselement,meansthateverymanagerwillbechanged.

Sowhenrunningacluster,onlymakesurethatyouhavewebappsinthere

thatneedtobeclusteredandremovetheotherones.

Aclusterhasthefollowingparameters:

className=thefullyqualifiednameoftheclusterclass

name=adescriptivenameforyourcluster,canbeanything

debug=thedebuglevel,highermeansmoreoutput

mcastAddr=themulticastaddress,hastobethesameforallthenodes

mcastPort=themulticastport,hastobethesameforallthenodes

mcastBindAddr=bindthemulticastsockettoaspecificaddress

mcastTTL=themulticastTTLifyouwanttolimityourbroadcast

mcastSoTimeout=themulticastreadtimeout

mcastFrequency=thenumberofmillisecondsinbetweensendinga"I'malive"heartbeat

mcastDropTime=thenumberamillisecondsbeforeanodeisconsidered"dead"ifnoheartbeatisreceived

tcpThreadCount=thenumberofthreadstohandleincomingreplicationrequests,optimalwouldbethesameamountofthreadsasnodes

tcpListenAddress=thelistenaddress(bindaddress)forTCPclusterrequestonthishost,

incaseofmultipleethernetcards.

automeansthataddressbecomes

InetAddress.getLocalHost().getHostAddress()

tcpListenPort=thetcplistenport

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1