Apache forward proxy that handles https

mydoghasworms picture mydoghasworms · Jun 8, 2013 · Viewed 26.7k times · Source

I followed the example in the following SO question to successfully set up an Apache forwarding proxy: Setting up an Apache Proxy with Authentication

It works well, except that when accessing sites via https, it says it cannot find the site. For example, Chrome gives

Error 111 (net::ERR_TUNNEL_CONNECTION_FAILED): Unknown error.

And on the server, I do not even see something in the access logs. For my proxy settings, I have configured the same for http and https (i.e. port 80 on my proxy server).

Do you perhaps have an example of how to set up a forward proxy with Apache for https?

Answer

mydoghasworms picture mydoghasworms · Jun 9, 2013

It seems the only thing I was missing is that I had not enabled mod_proxy_connect which was achieved with

sudo a2enmod proxy_connect

To quote the mod_proxy_connect documentation page:

This module requires the service of mod_proxy. It provides support for the CONNECT HTTP method. This method is mainly used to tunnel SSL requests through proxy servers.