Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

What you want to set up is a name based virtual host, see http://httpd.apache.org/docs/2.2/vhosts/name-based.html

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
</VirtualHost>

for every domain.

share|improve this answer

Your Answer

 
discard

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