Question: I'm migrating to a new server and would like to test before redelegating the domain over. I have some familiarity with setting up apache virtual hosts, but limited knowledge.

How can I go about setting this up? My server already has a domain delegated to the server, and the IP by default has been setup to point to that.

I've been told I can just add an entry to /etc/hosts/ which I haven't been able to understand what I can add in there to make this work.

Any pointers would be greatly appreciated!

Answer: 
[Here](http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) is a more detailed tutorial on creating hosts file entries.

The short answer is to make an entry in the file (`c:\windows\system32\drivers\etc\hosts`) that follows the pattern of *IP* [tab] *Host(s)*:

`1.1.1.1 www.myserver.com myserver.com`

On a Mac or Linux desktop, this file is at `/etc/hosts`.

This should be done on the client machine from which you will test the new server. Once you have put it into production and your new DNS records have propagated, you can safely remove the entry.
The simplest solution, in my mind, would be to create a dns entry such as www-test.domain.com and point it to your new ip.
In httpd.conf, add 

```
ServerAlias www-test.domain.com

```

to your virtualhost config.
reload named and httpd and point your browser to www-test.domain.com