1

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!

1 Answers1

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.

Jasper
  • 1,084
  • 10
  • 10