Open the Conf/server.xml file to see:
The code is as follows |
Copy Code |
<!--Define a non-ssl http/1.1 Connector on port 8080--> <connector port= "8080" maxhttpheadersize= "8192" maxthreads= "minsparethreads=" maxsparethreads= "75" Enablelookups= "false" redirectport= "8443" acceptcount= "100" connectiontimeout= "20000" disableuploadtimeout= "true"/> <!--note:to Disable connection timeouts, set connectiontimeout value to 0--> <!--note:to Use gzip compression you could set the following properties: Compression= "On" Compressionminsize= "2048" Nocompressionuseragents= "Gozilla, Traviata" Compressablemimetype= "Text/html,text/xml" --> |
To use the gzip compression feature, you can add the following properties to the connector instance:
1) compression= "on" to turn on the compression function
2 compressionminsize= "2048" to enable compressed output content size, which defaults to 2KB
3 nocompressionuseragents= "Gozilla, Traviata" for the following browsers, do not enable compression &<60;
4) compressablemimetype= "Text/html,text/xml" compression type
After the modification is complete
The code is as follows |
Copy Code |
<connector port= "8080" maxhttpheadersize= "8192" maxthreads= "minsparethreads=" maxsparethreads= "75" Enablelookups= "false" redirectport= "8443" acceptcount= "100" connectiontimeout= "20000" disableuploadtimeout= "true" compression= "on" Compressionminsize= "2048" Nocompressionuseragents= "Gozilla,traviata" Compressablemimetype= "Text/html,text/xml,text/javascript,text/css,text/plain"/> |
That is, add the red part inside the connector.