title: How to configure Oracle HTTP server apache mod_proxy to proxy certain HTTPS requests to external (origin) server over HTTPS
body: <p>I got two different application running on Two different servers<br>
      1. <strong>server1</strong> <strong>app1</strong> is lets say <strong>"abc.com"</strong> and I am making api post request <strong>"https abc.com/api/v1/clientId/setdata"</strong>. This server resides on company's virtual private cloud. Its based on Oracle application server that uses OHS. 
      2.There is one more application running on external server <strong>server2</strong> <strong>app2</strong> lets say <strong>"xyz.com"</strong>. This server is running on Amazon AWS with apache web server.  </p>
  
  <p>Now my question is : for certain clientIds I want to proxy request from abc.com to xyz.com as  <strong>"https xyz.com/api/clientId/setdata"</strong> </p>
  
  <p>Steps I performed.</p>
  
  <p>I modified the apache rewrite rule at server 1 "abc.com" as below </p>
  
  <pre><code>RewriteRule ^/api/v1/testClient/(.*) https://xyz.com/api/testClient/setdata [P,L]
  ProxyPassReverse  / https://xyz.com/
  </code></pre>
  
  <p>But I am getting below error when I send api request "<a href="https://abc.com/api/v1/testClient/445" rel="nofollow">https://abc.com/api/v1/testClient/445</a></p>
  
  <pre><code>The proxy server received an invalid response from an upstream server.
  The proxy server could not handle the request GET /api/certs/v1/testClient/445.
  
  Reason: Error reading from remote server 
  </code></pre>
  
  <p>Can anybody please explain what this error is abut . I do not see anything in access logs of xyz.com. 
  How the request flow goes when somebody tries to proxy https request to external server ?</p>
  
  <p>What is best solution to above problem ?</p>