如何在Apache 2.2.16中禁用SSL / TLS压缩?

我有一个服务器在Apache 2.2.16上运行。 我在服务器上运行VA扫描仪。 根据VA报告,build议closuresSSL / TLS压缩。 我试图search谷歌,但没有发现任何有用的。 任何人都可以告诉我如何在不升级版本的情况下在Apache 2.2.16中设置它。

有时,即使使用最新版本的Apache,如果当前的openssl库最近不够用,服务器也会返回以下错误:

Invalid command 'SSLCompression', perhaps misspelled or defined by a module not included in the server configuration. 

在这种情况下,您可以在启动Apache httpd服务器之前禁用导出以下variables的压缩:

 export OPENSSL_NO_DEFAULT_ZLIB=1 

我在这里find了这个build议:

您必须至less升级至2.2.24才能够执行此操作。

从版本2.2.24开始,您可以在服务器级别或单个虚拟主机上使用以下指令禁止SSL压缩:

 SSLCompression off 

所以对于一个单独的虚拟主机,你可以像这样禁止它:

 <VirtualHost *:443> ServerName "my.example.com" DocumentRoot "/var/www/html" SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP SSLCompression off # disallow for this vhost SSLCertificateFile /etc/ssl/my.example.com.crt SSLCertificateKeyFile /etc/ssl/my.example.com.key </VirtualHost> 

参考: http : //httpd.apache.org/docs/2.2/mod/mod_ssl.html

我没有足够的积分来回应或评论其他答复,所以我会在这里钟声。 正如Mathias所说,至less需要2.2.24来禁用压缩。

 SSLCompression off 

请注意,它不适用于2.2.25中的虚拟主机指令,因为我的服务器只是吐槽了:

 This version of openssl does not support configuring compression within <VirtualHost> sections. 

但是,在主httpd.conf文件中,它对于服务器范围的效果来说工作得很好。