title: How to setup session for a site alias. PHP Apache2
body: <p>I'm running php on an Apache2 server with virtual hosts.  I have 2 domains, let's say domain1.com and domain2.com (NOT subdomains)</p>
  
  <p>domain2.com is a ServerAlias of domain1.com</p>
  
  <p>The session on domain1.com is working just fine.  However, I can't get session variables to save on domain2.com.</p>
  
  <p>I don't believe my session is saving, because it's not carrying over between pages. I set the variables on my index.php page. I can dump the session and see that it was initially set.  Then my index.php redirects to home.php where I have this at the top of home.php</p>
  
  <pre><code>&lt;?php
  session_start();
  var_dump($_SESSION); 
  ?&gt;
  </code></pre>
  
  <p>I'm getting an empty array on home.php</p>
  
  <p>My phpinfo() settings are exactly the same for my session information on the 2 domains.</p>
  
  <p>I'm stuck, not sure if this is a php issue, or an apache setting. Any help is greatly appreciated! </p>