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

I have a client who intends to redirect all traffic for their domain to my server. how do I configure my server to in turn direct all that incoming traffic from that particular redirection onto a certain document root?

I will be hosting several different sites (whose domain i am the owner of) on one ip. however this is the first time i geta request where i get a redirection from an external DNS. I am just about to order the server package and dont have much experience with running my own server.

all help will be greatly appreciated. Thanks!

share|improve this question

What you want to set up is a name based virtual host, see

You'll have to make at least one NameVirtualHost entry (on for evert port your listenig on) and a few VirtualHost entries in your httpd.conf (or similiar, depending on what distro/OS you're using).

Basically you make a statement like

NameVirtualHost <YOURPUBLICIP or *(for all you IPs)>:<PORT(80 or 443>

and then entries like

<VirtualHost *:80>
  ServerName www.domain.tld
  ServerAlias domain.tld *.domain.tld
  DocumentRoot /www/domain

for every domain.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.