开发者

Enabling gzip compression for JBoss cluster with mod_jk load balancer

开发者 https://www.devze.com 2023-01-18 18:06 出处:网络
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 confi

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

0

精彩评论

暂无评论...
验证码 换一张
取 消