title: Apache proxypass https to https
body: <p>here is what I tired to do:</p>
  
  <ol>
  <li>browser -internet-> https(Apache proxypass)-intranet->(Apache https)</li>
  <li>both Apaches are installed the ssl certs.(startssl wide card,not self-signed)</li>
  </ol>
  
  <p>Apache error log:</p>
  
  <p><code>[client 192.168.2.157] SSL Proxy requested for test.xxx.com:443 but not enabled [Hint: SSLProxyEngine]</code></p>
  
  <p><code>[error] proxy: HTTPS: failed to enable ssl support for 192.168.2.157:443 (test.xxx.com)</code></p>
  
  <p>Then I tried use apache(on the internet) proxy to <a href="https://google.com" rel="nofollow noreferrer">https://google.com</a>
  and the error log is the same.</p>
  
  <p>However，https to http works. 
  browser -internet-> https(Apache proxypass)-intranet->(Apache http)</p>
  
  <p>My config:</p>
  
  <pre><code>&lt;VirtualHost  *:443&gt;
      SSLEngine on
      SSLCertificateFile /etc/apache2/ssl/xxx_com.crt
      SSLCertificateKeyFile /etc/apache2/ssl/xxx_com.key
      SSLCertificateChainFile /etc/apache2/ssl/sub.class2.server.ca.pem
      ProxyPreserveHost On
      ProxyRequests Off
      ProxyVia Off
      AllowEncodedSlashes NoDecode
      &lt;Proxy *&gt;
      Order deny,allow
      Allow from all
      &lt;/Proxy&gt;
      ProxyPass  /       https://2w.xxx.com/
      ProxyPassReverse   /       https://2w.xxx.com/
      ServerName test.xxx.com
      RequestHeader set X-Forwarded-Proto "https"
      RequestHeader set X-Forwarded-Port "443"
      ErrorLog "/var/log/apache2/error-ssl.log"
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>OR:</p>
  
  <pre><code>&lt;VirtualHost  *:443&gt;
      ProxyPass  /       https://google.com/
      ProxyPassReverse   /       https://google.com/
      SSLEngine on
      SSLCertificateFile /etc/apache2/ssl/xxx_com.crt
      SSLCertificateKeyFile /etc/apache2/ssl/xxx_com.key
      SSLCertificateChainFile /etc/apache2/ssl/sub.class2.server.ca.pem
      ServerName test.xxx.com
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>Seems like it's not possible for apache to handle https to https?
  if apache does not support this how about nginx?</p>