Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make my Apache use external proxy for HTTPS requests:

Listen 80
Listen 443
LoadModule proxy_module modules/
LoadModule proxy_connect_module modules/
SSLProxyEngine On
SSLProxyVerify none
SSLCACertificateFile conf/cert/curl-ca-bundle.cert

ProxyRemote http://*
ProxyRemote http://*
ProxyPass    /sub

But request for http://localhost/sub/something returns 503 and gives:

[Fri Apr 15 17:38:15 2011] [error] (OS 10060)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.  : proxy: HTTPS: attempt to connect to ( failed

What's weird

curl -x


How can I make Apache use external proxy for https request?

share|improve this question
cant help but notice a typo in your question. the Proxyremote rule using 443 needs to specify "https" as the protocol. i cant imagine that your use of "http" was intentional. – djangofan Apr 29 '11 at 18:07

The error your get is because of your last line into the config

 ProxyPass    /sub

That tells apache to proxy pass requests from /sub to which is what you actually get into your error message.

Now your setup is missing

 ProxyRequests On 

because ProxyRemote only functions when this is on and the User Agent(browser) is configured to use the apache server as a proxy . Is my understanding that you want to do something like:

  • 1 - proxy all traffic to /sub trough the remote proxies that you have configured - but not to use the local apache server as a ProxyPass ?! - if that is the case the remove the last line

  • 2 - you want your apache server to act that it has the resource /sub locally and actually the requests are going to a remote server ?! - if that is the case you need to configure just the last line with the appropriated port AND use this directive as well

ProxyPassReverse /sub # here configure the right port as you can see 443 is not working

share|improve this answer
What I want to do is to rewrite localhost/sub/something to, but I am in the corporate network so I have to use RewriteRule ^/sub/(.*)$1 [P] ProxyPass /sub works fine, but only for http or outside corpo. network. – tomalec Apr 16 '11 at 16:55
the rewrite rule do the same type of proxy as ProxyPass the only difference being that you actually make decisions or have certain criteria. can you post the final config that you have ? – silviud Apr 18 '11 at 22:42
up vote 0 down vote accepted

I finally got it working :) The problem was with (RTFM)

"match is either the name of a URL-scheme that the remote server supports, or a partial URL for which the remote server should be used, or * to indicate the server should be contacted for all requests. remote-server is a partial URL for the remote server. "

So resolution is simple, use ProxyRemoteMatch instead:

ProxyRemoteMatch externaldomain\.com
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.