Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have 2 versions of the same website located on different IPs -- one is production, and one is staging.

The production server: is managed completely by Site5. DNS is done so that resolves to Site5's servers and they take care of the rest.

The staging server: is an EC2 instance and Apache is set up with a name-based virtual host,

As a developer, when I need to work on the staging version, I change my hosts file so that:    # the elastic IP associated with my EC2 instance

so when I am in my browser and I visit, I see the staging version. I comment out the line when I want to see the production version.

This is all fine for me, but others on the team are not as tech savvy and are scared of the Terminal.

Is there a better way of doing this, preferably a method that doesn't require diving into the Terminal or other "scary stuff"?

Perhaps a proxy server they can choose to use/not use when they want to see/not see the staging version?

share|improve this question

Access it using the ipaddress or use a domain name that is unique. All links within the website should be relative otherwise the Site would also break if hosted on another domain.

share|improve this answer
Unfortunately, the website is wordpress and links aren't relative. There are ways to rename the domain name from within wordpress, but it's a big pain and adds to the complexity when migrating between staging and production. – Samuel Apr 26 '12 at 14:56

Editing the hosts file (with notepad.exe) is really the easiest and quickest way in Windows to override hostname resolution. Command line alternatives will be more long-winded and complex.

If you want it to stay temporary just keep the hosts file open and just hit save once you've made changes.

share|improve this answer
Yes, I do agree it is easy to change hosts. But I'm looking for a better solution that doesn't change the file, because changing hosts requires admin privileges and is in general, a pain. – Samuel Apr 26 '12 at 15:00
If you don't have local admin privileges you are unlikely to be able to override local resolution on the system. You will need to "man-in-the-middle" between your computer and what I assume is your corporate network with a router to override resolution per domain. Default router firmware will not provide specific DNS entries, so you will need to look at routing suites such as DD-WRT or PFSense to give you the level of control you need. However your corporate network will likely pick up on the rogue router. – BloodyIron Apr 26 '12 at 15:15
Right, I was thinking along the same lines - hence, I'm wondering if a proxy server acting as "man-in-the-middle" would suffice instead of a rogue router? Or a reverse proxy of some sort? – Samuel Apr 26 '12 at 15:29
If you don't have local admin you are unlikely to have the ability to change your local network settings, or install applications such as a proxy or VPN, due to the level of changes they would need to make to the environment. However if you man-in-the-middle with a router, that's something the operating system can't lock you out of unless you have static IP settings, which you can still work around. – BloodyIron Apr 26 '12 at 16:42

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.