title: moved ssl certificate from one apache server to another however site does not works with www
body: <p>I have recently moved my site from one VPS to another. Everything is done right and working fine except one problem of ssl.</p>
  
  <p>My site uses ssl. (using rapidssl certificate)</p>
  
  <p>I followed the instructions from here to move my certificates from one server to another.
  <a href="http://www.sslshopper.com/apache-server-ssl-installation-instructions.html" rel="nofollow">http://www.sslshopper.com/apache-server-ssl-installation-instructions.html</a></p>
  
  <p>The problem I am facing is very strange to me. In HTTPS mode, My site works fine with the like url <a href="http://stackoverflow.com">http://stackoverflow.com</a>, <a href="https://stackoverflow.com">https://stackoverflow.com</a> however it does not work with <a href="https://www.stackoverflow.com">https://www.stackoverflow.com</a> (notice www).</p>
  
  <p>The problem is strange to me because it does work on old server. </p>
  
  <p>Thanks in advance.
  Pras</p>
  
  <p>Here are my virtual hosts</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerAdmin webmaster@@localhost
  DocumentRoot /var/www/webroot/
  ServerName stackoverflow.com
  ServerAlias www.stackoverflow.com
  &lt;Directory //var/www/webroot/&gt;
      Options Indexes FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
  &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  &lt;IfModule mod_ssl.c&gt;
  &lt;VirtualHost ***.***.***.***:443&gt;
      ServerAdmin webmaster@localhost
      ServerName stackoverflow.com
      ServerAlias www.stackoverflow.com
  
      DocumentRoot /var/www/webroot/
      &lt;Directory /var/www/webroot/&gt;
              Options -Indexes
              AllowOverride All
              Order allow,deny
              allow from all
      &lt;/Directory&gt;
      SSLEngine on
      SSLCertificateFile    /etc/apache2/ssl/thirdparty.crt
      SSLCertificateKeyFile /etc/apache2/ssl/thirdparty.key
      SSLCACertificateFile  /etc/apache2/ssl/thirdpartyssl.ca
      BrowserMatch "MSIE [2-6]" \
              nokeepalive ssl-unclean-shutdown \
              downgrade-1.0 force-response-1.0
      BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  &lt;/VirtualHost&gt;
  &lt;/IfModule&gt;
  </code></pre>