您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 质量控制/管理 > 【精品论文】xml配置文件-计算机安全_7019
xml配置文件-计算机安全xml配置文件!--ExampleServerConfigurationFile--!--Notethatcomponentelementsarenestedcorrespondingtotheirparent-childrelationshipswitheachother--!--AServerisasingletonelementthatrepresentstheentireJVM,whichmaycontainoneormoreServiceinstances.TheServerlistensforashutdowncommandontheindicatedport.Note:AServerisnotitselfaContainer,soyoumaynotdefinesubcomponentssuchasValvesorLoggersatthislevel.--Serverport=8005shutdown=SHUTDOWN!--CommenttheseentriesouttodisableJMXMBeanssupportusedfortheadministrationwebapplication--ListenerclassName=org.apache.catalina.core.AprLifecycleListener/ListenerclassName=org.apache.catalina.mbeans.ServerLifecycleListener/ListenerclassName=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ListenerclassName=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/!--GlobalJNDIresources--GlobalNamingResources!--Testentryfordemonstrationpurposes--Environmentname=simpleValuetype=java.lang.Integervalue=30/!--EditableuserdatabasethatcanalsobeusedbyUserDatabaseRealmtoauthenticateusers--Resourcename=UserDatabaseauth=Containertype=org.apache.catalina.UserDatabasedescription=Userdatabasethatcanbeupdatedandsavedfactory=org.apache.catalina.users.MemoryUserDatabaseFactorypathname=conf/tomcat-users.xml//GlobalNamingResources!--AServiceisacollectionofoneormoreConnectorsthatshareasingleContainer(andthereforethewebapplicationsvisiblewithinthatContainer).Normally,thatContainerisanEngine,butthisisnotrequired.Note:AServiceisnotitselfaContainer,soyoumaynotdefinesubcomponentssuchasValvesorLoggersatthislevel.--!--DefinetheTomcatStand-AloneService--Servicename=Catalina!--AConnectorrepresentsanendpointbywhichrequestsarereceivedandresponsesarereturned.EachConnectorpassesrequestsontotheassociatedContainer(normallyanEngine)forprocessing.Bydefault,anon-SSLHTTP/1.1Connectorisestablishedonport8080.YoucanalsoenableanSSLHTTP/1.1Connectoronport8443byfollowingtheinstructionsbelowanduncommentingthesecondConnectorentry.SSLsupportrequiresthefollowingsteps(seetheSSLConfigHOWTOintheTomcat5documentationbundleformoredetailedinstructions):*IfyourJDKversion1.3orprior,downloadandinstallJSSE1.0.2orlater,andputtheJARfilesinto$JAVA_HOME/jre/lib/ext.*Execute:%JAVA_HOME%\bin\keytool-genkey-aliastomcat-keyalgRSA(Windows)$JAVA_HOME/bin/keytool-genkey-aliastomcat-keyalgRSA(Unix)withapasswordvalueofchangeitforboththecertificateandthekeystoreitself.Bydefault,DNSlookupsareenabledwhenawebapplicationcallsrequest.getRemoteHost().Thiscanhaveanadverseimpactonperformance,soyoucandisableitbysettingtheenableLookupsattributetofalse.WhenDNSlookupsaredisabled,request.getRemoteHost()willreturntheStringversionoftheIPaddressoftheremoteclient.--!--Defineanon-SSLHTTP/1.1Connectoronport8080--Connectorport=8080maxHttpHeaderSize=8192maxThreads=150minSpareThreads=25maxSpareThreads=75enableLookups=falseredirectPort=8443acceptCount=100connectionTimeout=20000disableUploadTimeout=true/!--Note:Todisableconnectiontimeouts,setconnectionTimeoutvalueto0--!--Note:Tousegzipcompressionyoucouldsetthefollowingproperties:compression=oncompressionMinSize=2048noCompressionUserAgents=gozilla,traviatacompressableMimeType=text/html,text/xml--!--DefineaSSLHTTP/1.1Connectoronport8443--!--Connectorport=8443maxHttpHeaderSize=8192maxThreads=150minSpareThreads=25maxSpareThreads=75enableLookups=falsedisableUploadTimeout=trueacceptCount=100scheme=httpssecure=trueclientAuth=falsesslProtocol=TLS/--!--DefineanAJP1.3Connectoronport8009--Connectorport=8009enableLookups=falseredirectPort=8443protocol=AJP/1.3/!--DefineaProxiedHTTP/1.1Connectoronport8082--!--Seeproxydocumentationformoreinformationaboutusingthis.--!--Connectorport=8082maxThreads=150minSpareThreads=25maxSpareThreads=75enableLookups=falseacceptCount=100connectionTimeout=20000proxyPort=80disableUploadTimeout=true/--!--AnEnginerepresentstheentrypoint(withinCatalina)thatprocesseseveryrequest.TheEngineimplementationforTomcatstandaloneanalyzestheHTTPheadersincludedwiththerequest,andpassesthemontotheappropriateHost(virtualhost).--!--YoushouldsetjvmRoutetosupportload-balancingviaAJPie:Enginename=StandalonedefaultHost=localhostjvmRoute=jvm1--!--Definethetoplevelcontainerinourcontainerhierarchy--Enginename=CatalinadefaultHost=localhost!--Therequestdumpervalvedumpsusefuldebugginginformationabouttherequestheadersandcookiesthatwerereceived,andtheresponseheadersandcookiesthatweresent,forallrequestsreceivedbythisinstanceofTomcat.Ifyoucareonlyaboutrequeststoaparticularvirtualhost,oraparticularapplication,nestthiselementinsidethecorrespondingHostorContextentryinstead.ForasimilarmechanismthatisportabletoallServlet2.4containers,checkouttheRequestDumperFilterFilterintheexampleapplication(thesourceforthisfiltermaybefoundin$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters).Requestdumpingisdisabledbydefault.Uncommentthefollowingelementtoenableit.--!--ValveclassName=org.apache.catalina.valves.RequestDumperValve/--!--BecausethisRealmishere,anins
本文标题:【精品论文】xml配置文件-计算机安全_7019
链接地址:https://www.777doc.com/doc-1251501 .html