简体   繁体   中英

Enabling gzip compression for JBoss cluster with mod_jk load balancer

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM