I have 2 domain names registered.
I also have 1 server at AWS. (running Ubuntu)

I would like to host 2 websites on my server but have no clue how to do it.

I have two directories /var/www/alpha and /var/www/beta for each domain.

alpha DNS is already configured to work with www.mywebsite.co and mywebsite.co and so on.

I'm very new to admin systems any help would be much appreciated.

I've looked online and found this thread: How to host 2 domain names on the same server in iis7?

where a guy say:

You setup the http headers of the virtual folder so the http server knows which http address goes to which virtual folder.

Is it the way to follow ? I don't know how to do that.

Many thanks guys :)

1 Answer 1


You must use a VirtualHost configuration.

Virtual Hosts are used to run more than one domain off of a single IP address. This is especially useful to people who need to run several sites off of one virtual private server. The sites display different information to the visitors, depending on with which the users accessed the site.There is no limit to the number of virtual hosts that can be added to a VPS.

Take a look in these links:

Virtual hosting

How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.