title: How to configure multiple Virtual Hosts on AWS EC2 Running Ubuntu?
body: <p>I'm trying to configure a virtual host to my EC2 instance. I'm using ubuntu on my EC2 instance and apache2 as web server.</p>
  
  <p>I have 3 applications (web-based) in 3 different folders in /var/www:
  - /var/www/app_A
  - /var/www/app_B
  - /var/www/mywebsite</p>
  
  <p>I want people to only be able to access app_A and app_B using IP address (I've attached elastic IP to my EC2 instance) as in <a href="http://my.ip.address/app_A" rel="nofollow">http://my.ip.address/app_A</a> and <a href="http://my.ip.address/app_B" rel="nofollow">http://my.ip.address/app_B</a>. As for the application in /var/ww/mywebsite, I want people to be able to access that through my domain mywebsite.com. I've point the domain to my EC2 IP address (my.ip.address).</p>
  
  <p>I know I have to create virtual hosts to be able to achieve this, but I'm really new at this. I've been trying to google the solution, and tried several solutions but keep failing.</p>
  
  <p>Please tell me how to setup a virtual host correctly so I can achieve my purpose written above.</p>