title: vhosts without SSL cert setup redirect to other vhosts that use SSL
body: <p>I'm running apache with on a multi-tenant server with vhost sites configured.</p>
  
  <p>So I have a vhost for domain1.com that has SSL cert defined in the vhost file. Then I have domain2.com that does not have SSL cert defined. If I visit <code>https://domain2.com</code>, the browser pulls up the website for domain1.com, then of course displays a broken SSL cert warning in the browser.</p>
  
  <p>The way I'm trying to correct this is:</p>
  
  <p>First, in the vhost.conf file for domain2 I've put this:  </p>
  
  <pre><code> &lt;VirtualHost ip:443&gt;  
   ServerName domain2.com  
   DocumentRoot /var/www/domain2/  
   SSLEngine on  
   SSLCertificateFile /var/certs/cert.crt  
   SSLCertificateKeyFile /var/certs/cert.key  
   Redirect permanent / http://www.domain2.com  
   &lt;/VirtualHost&gt;  
  </code></pre>
  
  <p>Of course this client doesn't actually own their own SSL certificate, so I'm pointing it to a certificate file for one of our domains. This in some instances gives a certificate warning to the user when they visit <code>https://www.domain2.com</code> or <code>https://domain2.com</code>. (in Chrome I can go to <code>https://domain2.com</code> and get redirected without a warning)</p>
  
  <p>Of course generating a self-signed cert to use for this purpose also throws a cert warning. If I remove the "SSLEngine On" directive so I don't have to specify a cert at all, it essentially breaks SSL on the entire server and no sites work right.</p>
  
  <p>How can I successfully do this without having to worry about users getting the certificate warning, and simply redirect all their HTTPS requests for domain2.com to HTTP?</p>