We have a JBoss configured in cluster with Apache HTTP+mod_jk as a load balancer. Do we need to configure anything on Apache side in 开发者_如何转开发addition to configuring compression in JBoss configuration for connector?
In standard JBoss gzip compression could be enabled for HTTP connector, but not for AJP. AJP connector is used between Apache HTTP server and JBoss.
To enable gzip compression on Apache HTTP server side add following lines to mod_jk.conf before </VirtualHost>:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript
This will enable gzip compression for specified mime types by means of mod_deflate output filter http://httpd.apache.org/docs/2.2/mod/mod_deflate.html.
Also uncomment following line in httpd.conf to turn on mod_deflate:
LoadModule deflate_module modules/mod_deflate.so
精彩评论