I want to proxy requests from an SSL site via a non-SSL site. My Apache httpd.conf looks like this:

    ServerName foo.com
    ProxyPass / https://bar.com/

So, when I visit http://foo.com, I expect apache to make a request to https://bar.com and send me the the page it fetched.

Instead, I get a 500 error, and in the error log, I see:

[error] proxy: HTTPS: failed to enable ssl support for (bar.com)

Presumably I'm missing a directive here. Which might it be?

Never mind the security implications. I fully understand the risks.

  • Which version of Apache are you using? Nov 15, 2009 at 1:40
  • 1
    "Never mind the security implications. I fully understand the risks." - This is the devops equivalent of "Hold My Beer" ; ) Nov 13, 2018 at 23:52

2 Answers 2


You'll need mod_ssl, mod_proxy and optionally mod_rewrite. Depending on your distribution and Apache version you may have to check if mod_proxy_connect and mod_proxy_http are loaded as well.

The directives for enabling SSL proxy support are in mod_ssl:

    ServerName foo.com
    SSLProxyEngine On
    SSLProxyCheckPeerCN on
    SSLProxyCheckPeerExpire on
    ProxyPass / https://secure.bar.com
    ProxyPassReverse / https://secure.bar.com

IIRC you can also use:

    RewriteRule / https://secure.bar.com [P]    # don't forget to setup SSLProxy* as well
  • With SSLProxy* directives, works as a charm Aug 31, 2022 at 17:40
  • If using RewriteRules, you would want to also append the URI path to the proxy: RewriteRule ^(/.*)$ https://secure.bar.com$1 [P]
    – tshalif
    May 2 at 15:55

In Apache 1.x, mod_ssl would fix up ProxyPass. Do you have mod_ssl installed?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .