码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat 增加压缩设置

时间:2016-03-30 12:24:45      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:

conf/server.xml中,Connector的配置中添加

compression="on" compressionMinSize="512" noCompressionUserAgents="gozilla, traviata"

实际的例子:

    <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
               connectionTimeout="20000"
               redirectPort="8443"
               maxHttpHeaderSize ="8192" maxThreads ="4096" minSpareThreads ="512"
               enableLookups ="false" acceptCount ="512" disableUploadTimeout ="true"
               compression="on" compressionMinSize="512" noCompressionUserAgents="gozilla, traviata"
               />


   <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"
               connectionTimeout="20000"
               maxThreads="4096" maxHttpHeaderSize ="8192" minSpareThreads ="512"
               compression="on" compressionMinSize="512" noCompressionUserAgents="gozilla, traviata"
               scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" 
               ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"
               keystoreFile="${catalina.base}/keystore/xxx.p12" keystorePass="111" keystoreType="PKCS12"
               />

 

tomcat 增加压缩设置

标签:

原文地址:http://www.cnblogs.com/got-my-way/p/5332809.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!