AWS-EC2, how to set multiple public sites with just one instance?

tech_me asked:

I have read many articles and also topics in SF, but could not find out any clue to my case.

I have on instance of AWS-EC2, and want to hold several public sites within it.

I have already get my first public site to run like below:

What I have done is just added a file which named manmu under

<VirtualHost *:80>
    DocumentRoot /home/ubuntu/manmu/YYYYY/web
    DirectoryIndex index.php

and then
ubuntu@ip-10-245-38-136:/etc/apache2/sites-enabled$ ln -s ../sites-available/manmu

But how could I get my other sites to run?
For example, I may want some subdomains such as:
and so on.

Thank you.
Best regards,

My answer:

You can’t create subdomains of the EC2-provided hostname. You must use name-based virtual hosting with your own domain name.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.