title: Apache proxy redirects from HTTPS to HTTP
body: <p>Below is apache reverse proxy configuration snippet which uses "ProxyPass" and "ProxyPassReverse"</p>
  
  <pre><code>Listen 1.2.3.4:80
  &lt;VirtualHost 1.2.3.4:80&gt;
    ProxyPreserveHost On
    SSLProxyEngine On
    ProxyPass /artifactory https://xxxx.xxxx.xxx/artifactory 
    ProxyPassReverse /artifactory https://xxxx.xxxx.xxx/artifactory 
  </code></pre>
  
  <p></p>
  
  <pre><code>Listen 1.2.3.4:443
  &lt;VirtualHost 1.2.3.4:443&gt;
    SSLProxyEngine On
    ProxyPreserveHost On
    ProxyPass /artifactory https://xxxx.xxxx.xxx/artifactory
    ProxyPassReverse /artifactory https://xxxx.xxxx.xxx/artifactory
  &lt;/VirtualHost&gt;   
  </code></pre>
  
  <p>when I run below wget command, somehow it redirects to http:</p>
  
  <pre><code>#wget --no-check-certificate "https://xxxx.xxxx.xxx/artifactory/"
  --2017-09-27 06:25:50--  
  https://xxxx.xxxx.xxx/artifactory/
  Resolving xxxx.xxxx.xxx... 1.2.3.4
  Connecting to xxxx.xxxx.xxx|1.2.3.4|:443... connected.
  WARNING: certificate common name “xxxx.xxxx.xxx” doesn't match requested 
  host name “xxxx.xxxx.xxx”.
  HTTP request sent, awaiting response... 302 Found
  Location: http://xxxx.xxxx.xxx/artifactory/webapp/ [following]
  --2017-09-27 06:25:51--  
  http://xxxx.xxxx.xxx/artifactory/webapp/
  Connecting to xxxx.xxxx.xxx|1.2.3.4|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 1449 (1.4K) [text/html]
  Saving to: “index.html.18”
  </code></pre>
  
  <p>If I run wget command with "/artifactory/webapp/#/home" it work on https:</p>
  
  <pre><code>wget --no-check-certificate "https://xxxx.xxxx.xxx/artifactory/webapp/#/home"
  --2017-09-27 06:12:48-
  https://xxxx.xxxx.xxx/artifactory/webapp/
  Resolving xxxx.xxxx.xxx... 1.2.3.4
  Connecting to xxxx.xxxx.xxx|1.2.3.4|:443... connected.
  WARNING: certificate common name “xxxx.xxxx.xxx” doesn't 
  match requested host name “xxxx.xxxx.xxx”.
  HTTP request sent, awaiting response... 200 OK
  Length: 1449 (1.4K) [text/html]
  Saving to: “index.html.17”
  
  2017-09-27 06:12:49 (73.1 MB/s) - “index.html.17” saved [1449/1449]
  </code></pre>
  
  <p>I have not defined redirects anywhere in proxy config file. </p>
  
  <p>Could anyone suggest what could be the reason behind this behavior.? and how can I avoid getting it redirected to HTTP.?</p>