title: AWS-EC2, how to set multiple public sites with just one instance?
body: <p>I have read many articles and also topics in SO, but could not find out any further help.</p>
  
  <p>I have on instance of AWS-EC2, and want to hold several public sites within it.</p>
  
  <p>I have already get my first public site to run like below:<br>
  <a href="http://ec2-50-xxx-214-xxx.us-west-2.compute.amazonaws.com/" rel="noreferrer">http://ec2-50-xxx-214-xxx.us-west-2.compute.amazonaws.com/</a></p>
  
  <p>What I have done is just added a file which named manmu under<br>
  <strong>/etc/apache2/sites-available</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName ec2-50-xxx-214-xxx.us-west-2.compute.amazonaws.com
      DocumentRoot /home/ubuntu/manmu/YYYYY/web
      DirectoryIndex index.php
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and then<br>
  <strong>ubuntu@ip-10-245-38-136:/etc/apache2/sites-enabled$ ln -s ../sites-available/manmu</strong></p>
  
  <p>But how could I get my other sites to run?<br>
  For example, I may want some subdomains such as:<br>
  <a href="http://abc.ec2-50-xxx-214-xxx.us-west-2.compute.amazonaws.com/" rel="noreferrer">http://abc.ec2-50-xxx-214-xxx.us-west-2.compute.amazonaws.com/</a><br>
  and so on.</p>
  
  <p>And also, I could have my local machine to run multiple sites(I mean urls) such as:  <a href="http://abc.manmu.localhost" rel="noreferrer">http://abc.manmu.localhost</a><br>
  <a href="http://def.manmu.localhost" rel="noreferrer">http://def.manmu.localhost</a><br>
  which I am using /etc/hosts and /etc/apache2/site-availables(and ../site-enabled).<br>
  But I do really not know how to configure AWS for public access of multiple urls.</p>
  
  <p>I just heard something like Elastic IP, does this any help which instead of a real domain?</p>
  
  <p>Thank you.<br>
  Best regards,<br>
  tech_me</p>