【精品论文】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

1 / 13
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功