Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I've set up an Ubuntu 10.04 LAMP server. I am going to set up multiple domains so that they will point to this server's IP. How to configure the server so, that it will serve a specific site (placed in a specific folder) according to a domain name which was used in the request?

share|improve this question

marked as duplicate by Michael Hampton Dec 12 '15 at 2:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 8 down vote accepted

use name-based virtual hosts, http://httpd.apache.org/docs/2.2/vhosts/name-based.html

share|improve this answer

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