【问题标题】:How to make Apache httpd proxy to backend https service use TLSv1.2 instead of TLSv1如何使 Apache httpd 代理后端 https 服务使用 TLSv1.2 而不是 TLSv1
【发布时间】:2023-01-05 22:41:24
【问题描述】:

配置文件:

SSLEngine on
SSLProxyEngine On
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLProxyProtocol all -SSLv3 -TLSv1 -TLSv1.1

一些代理.conf:

ProxyPass /x https://x:8443
ProxyPassReverse /x https://x:8443
AllowCONNECT 8443

通过代理发出请求时: curl -k -v -XGET https://localhost/x/y

进入日志:

[Thu Jan 05 12:31:40.599913 2023] [proxy_http:error] [pid 14] (103)Software caused connection abort: [client 172.18.0.1:59228] AH01102: error reading status line from remote server x:8443
[Thu Jan 05 12:31:40.599951 2023] [proxy:error] [pid 14] [client 172.18.0.1:59228] AH00898: Error reading from remote server returned by /x/y
172.18.0.1 - - [05/Jan/2023:12:31:40 +0000] "GET /x/y HTTP/1.1" 502 461 "-" "curl/7.68.0" 837 4435

并查看 wireshark 数据包:

1470438 8882.445761230  172.18.0.13 172.18.0.15 TLSv1   280 Client Hello

期望获得 TLSv1.2 握手而不是 TLSv1 握手请求... 有什么建议么?一些配置问题?

泊坞窗,Centos7,httpd 2.4.6,mod_ssl 2.4.6,openssl 1.0.2k

尝试将 SSLProxyProtocol 限制为仅 TLSv1.2 - 没有变化 尝试将 openssl.cnf 修改为 MinProtocol = TLSv1.2 - 没有变化,可能做错了什么...... 尝试将后端的最小协议降低到 TLSv1 - 有效但不是有效的解决方案......

【问题讨论】:

    标签: apache openssl mod-proxy


    【解决方案1】:
    [Thu Jan 05 12:31:40.599913 2023] [proxy_http:error] [pid 14] (103)Software caused connection abort: [client 172.18.0.1:59228] AH01102: error reading status line from remote server x:8443
    

    此错误是由于在某些情况下重用连接时发生的竞争条件造成的。正如 mod_http 文档所述,它是

    由后端服务器在代理检查连接后和代理发送的数据到达后端之前关闭池连接的竞争条件引起

    并且可以通过在 httpd.conf 中设置 proxy-initial-not-pooled 来阻止。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-14
      • 1970-01-01
      • 2012-04-08
      • 1970-01-01
      • 2019-07-13
      • 2021-05-23
      • 1970-01-01
      • 2015-07-30
      相关资源
      最近更新 更多