[解決] tomcat 8.5 gzip不生效
阿新 • • 發佈:2019-01-08
注意紅色部分,(大概是sendfile和compression不能同時使用)
<Connector port="8080" protocol="org.apache.coyote.http11.Http11Nio2Protocol"
useSendfile="false"connectionTimeout="20000"
redirectPort="8443"
executor="tomcatThreadPool"
enableLookups="false"
acceptCount="100"
maxPostSize="10485760"
compression="on"
disableUploadTimeout="true"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
acceptorThreadCount="2"
compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript
URIEncoding="utf-8"/>