title: Redirect http to htps on apache2 vhost behind aws ELB
body: <p>I have a small problem with redirecting everything from http to https.
  Here is the setup of my environment:</p>
  
  <p>The server is a docker host which runs multiple docker containers. I'm trying to access a container that listens on port 9000. so I have a ProxyPass in the vhost file that looks like this:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ProxyPreserveHost On
      ServerName subdomain.domain.com
      ProxyPass / http://localhost:9000/
      ProxyPassReverse / http://localhost:9000/
      Redirect / https://subdomain.domain.com/
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>The SSL Certificate is issued by AWS.
  This server is behind a AWS Load Balancer. From the load balancer I have 2 target groups. One is redirecting 80 to 80, and the other 443 to 443.</p>
  
  <p>Right now the <a href="https://subdomain.domain.com" rel="nofollow noreferrer">https://subdomain.domain.com</a> is throwing 502 bad gateway error.</p>
  
  <p>Could someone have any idea what the issue here might be? Thanks in advance!</p>