Search code examples
apachemod-proxy

Apache reverse proxy to https site gives (70014)End of file found:


I'm using apache mod_proxy to reverse proxy to a backend HTTPS server that is working on a non-standard port (blocked by several firewalls hense the need for a reverse proxy).

The client connection is over HTTPS to apache, which then inturn connects to what I beleive is either an nginx or tomcat server (the backend server is a Zimbra mail servers administration console).

I'm getting the following error in the logs

[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])

with the following configuration on an Ubuntu 12.10 server with "apache2 2.2.22-6ubuntu2.2" and "libapache2-mod-proxy-html 3.0.1-1.1" packages installed

    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

I have no idea what more I can do. The backend server site is accessible via lynx from the apache server so it's not a blantly obvious issue to me.


Solution

  • If I understand your question right - your communication route looks like this

    Browser Apache backend server

    In this case, you must remove the ProxyRemote directive - because it's only needed if you communicate via another proxy with the backend server.