Apache反向代理到HTTPS网站出现(70014)文件结尾错误:

3
我正在使用apache mod_proxy将一个工作在非标准端口(因为被多个防火墙阻挡而需要使用反向代理)的后端HTTPS服务器进行反向代理。
客户端通过HTTPS连接到apache,然后apache再连接到我认为是nginx或tomcat服务器的后端服务器(后端服务器是Zimbra邮件服务器管理控制台)。
我在日志中看到以下错误信息。
[Thu Jun 27 11:35:26 2013] [debug] mod_proxy_http.c(56): proxy: HTTP: canonicalising URL //[internal_url]:7071/
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(1506): [client [client_ip] proxy: https: found worker https://[internal_url]:7071/ for https://[internal_url]:7071/
[Thu Jun 27 11:35:26 2013] [debug] mod_proxy.c(968): Trying to run scheme_handler against proxy
[Thu Jun 27 11:35:26 2013] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL https://[internal_url]:7071/
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(1949): proxy: HTTPS: retrying the worker for ([internal_url])
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(1955): proxy: HTTPS: worker for ([internal_url]) has been marked for retry
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(2011): proxy: HTTPS: has acquired connection for ([internal_url])
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(2067): proxy: connecting https://[internal_url]:7071/ to [internal_url]:7071
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(2193): proxy: connected https://[internal_url]:7071/ to [internal_url]:7071
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(2444): proxy: HTTPS: fam 2 socket created to connect to [internal_url]
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(2285): proxy: CONNECT: sending the CONNECT request for [internal_url]:7071 to the remote proxy [internal_ip]:7071 ([internal_url])
[Thu Jun 27 11:35:26 2013] [error] (70014)End of file found: proxy: HTTPS: attempt to connect to [internal_url]:7071 via http CONNECT through [internal_ip]:7071 ([internal_url]) failed
[Thu Jun 27 11:35:26 2013] [error] ap_proxy_connect_backend disabling worker for ([internal_url])
[Thu Jun 27 11:35:26 2013] [debug] proxy_util.c(2029): proxy: HTTPS: has released connection for ([internal_url])

在安装有“apache2 2.2.22-6ubuntu2.2”和“libapache2-mod-proxy-html 3.0.1-1.1”软件包的Ubuntu 12.10服务器上,配置如下:
    ProxyRequests   on
    ProxyRemote     *       https://[internal_url]:7071
    ProxyPass       /       https://[internal_url]:7071/
    ProxyPassReverse        /       https://[internal_url]:7071/
    ProxyPassReverseCookieDomain    [internal_url] [external_url]

    SSLProxyEngine  on

    ProxyPreserveHost       on
    ProxyVia        on

我不知道还能做什么。后端服务器可以通过apache服务器的lynx访问,因此对我来说这不是一个明显的问题。


你的问题可能与CA证书有关。尝试按照Vortura在ServerFault上的答案操作,以查看您的证书是否有效:请点击此处。建议您在StackExchange上提出这个问题,那里更加相关。 - Alain Vitry
你能够窥探TCP并查看客户端发起的请求吗?这样你至少可以找出连接是否正在建立,如果是,服务器是否有返回任何内容。 - user2579943
1个回答

2
如果我理解你的问题正确,您的通讯路线如下所示:
浏览器 Apache 后端服务器
在这种情况下,您必须删除 ProxyRemote 指令 - 因为只有当您通过另一个代理与后端服务器通信时才需要它。

cyberflohr 是正确的(你的错误信息和 Apache 文档都不是很有帮助)。移除 ProxyRequestsProxyRemote,一切都应该正常工作。 - csd

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接