简体   繁体   English

使用mod_jk负载均衡器为JBoss群集启用gzip压缩

[英]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. 我们在集群中配置了JBoss,Apache HTTP + mod_jk作为负载均衡器。 Do we need to configure anything on Apache side in addition to configuring compression in JBoss configuration for connector? 除了在连接器的JBoss配置中配置压缩之外,我们还需要在Apache端配置任何东西吗?

In standard JBoss gzip compression could be enabled for HTTP connector, but not for AJP. 在标准JBoss中,可以为HTTP连接器启用gzip压缩,但不能为AJP启用压缩。 AJP connector is used between Apache HTTP server and JBoss. Apache HTTP服务器和JBoss之间使用AJP连接器。

To enable gzip compression on Apache HTTP server side add following lines to mod_jk.conf before </VirtualHost>: 要在Apache HTTP服务器端启用gzip压缩,请在</ VirtualHost>之前将以下行添加到mod_jk.conf:

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 . 这将通过mod_deflate输出过滤器http://httpd.apache.org/docs/2.2/mod/mod_deflate.html为指定的mime类型启用gzip压缩。

Also uncomment following line in httpd.conf to turn on mod_deflate: 同时取消注释httpd.conf中的以下行以打开mod_deflate:

LoadModule deflate_module modules/mod_deflate.so LoadModule deflate_module modules / mod_deflate.so

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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