Possible Duplicate:
third level domain and debian

How can I go about having another alias for my web address, what i mean is, if to get to a website on my centos server i can go to domain.com for example, how can i make it so something like x.domain.com will also work as an address to my website, i want to use a VirtualHost to later make that second address land on a different index page...any help is appriciated




For the time being, you can use the 'ServerAlias' directive in your current VirtualHost configuration.

<VirtualHost *:80>
    ServerName domain.com
    ServerAlias x.domain.com
    DocumentRoot /path/to/web/dir

Then later on, you can configure a new VirtualHost for x.domain.com to point to a new documentroot.

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