我有一个奇怪的问题,在我的 Apache 2.4.1 httpd.conf 中包含以下语法会在通过 HAproxy 检索 swf 文件时导致“502 Bad Gateway”错误:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript
当我删除此配置行时,502 Bad Gateway 错误就会消失。
服务器在成功请求时返回这些响应 header :
Date: Wed, 11 Apr 2012 20:24:12 GMT
Server: Apache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
200 OK
最佳答案
我通过更新到 Apache 2.4.2(2.4.1 中存在 mod_deflate seg 错误错误)并添加以下内容修复了此问题:
header 附加不同的用户代理
在 AddOutputFilterByType
行下方。
关于apache - 如何在 Apache 2.4.1 中与 Haproxy 一起使用 mod_deflate?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10113454/