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

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

1 Answer 1

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 10.0.0.10 and the client domain name is example.com, then you'd add this line:

10.0.0.10 example.com

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

share|improve this answer

Your Answer

 
discard

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.