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 am currently working on a client project where they are using a custom CMS which relies on having the specific domains configured for it to work properly.

When I try running the site on my test environment, the entire website fails because it isn't located on the primary domain (and I'm pretty sure the domain is hard coded since there's no control panel to adjust the file locations).

Is it possible to use my test environment URL but have Apache and the DNS emulate my clients website URL locally, rather than calling the actual name servers?

Right now I have a virtual host setup in Apache but I am not sure where to go from there.

share|improve this question
up vote 2 down vote accepted

Just add a line to your hosts file. If you're on a Unix-y system, that file is /etc/hosts. If your server IP was and the client domain name is, then you'd add this line:

If you're on windows, the location is %SystemRoot%\system32\drivers\etc\hosts.

share|improve this answer

Your Answer


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

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