0

I picked up a new server to do some testing and need of a little help in setting up my environment at home.

Here is what I would like to do: The test server will be used to test new code and configurations for a SaaS product. I would like from my laptop to enter www.acme.com and have it hit the server. The server is connected to a wireless router.

I have windows server 2008 with IIS running on an an IP of 192.168.1.4.

What is the best way to set this up? I want to hit the test server for www.acme.com and not go out to the internet.

Do i need to mess with the LMHosts file?

Thanks for the help. Im sure its easy but have never done this before.

2

Open the hosts file on the Client PCs in C:\WINDOWS\system32\drivers\etc with Notepad and below the line:

127.0.0.1 localhost

add another line with:

192.168.1.4 www.acme.com

Your browser should check this file before it does a DNS check and use the given IP address.

Note: This will redirect all traffic for www.acme.com to that server, so if you need access to the actual website you can add a # before the line in hosts to switch it off.

| improve this answer | |
  • this will be done on every machine accessing the server correct? Do i need to do anything on the server if i want to access the site? – chopps Apr 7 '10 at 22:58
  • Upped, but make sure you are doing this on YOUR Machine, not your server.. (do the same on the server if you want to access it from there too) – Grizly Apr 7 '10 at 22:59
  • Absolutely on the "client" machines. Server only if you want access like Grizly says. If you have a few test clients (5+ maybe?), then a DNS solution might be a better fix for the long term. Easier to change IP and so on – Seanchán Torpéist Apr 7 '10 at 23:03
  • so i can browse 192.168.0.4 and the default page comes up but when i do this it still goes out to the net. 192.168.0.4 acme.com ideas? – chopps Apr 8 '10 at 3:09
  • If you are browsing to www.acme.com, that also needs to be in hosts file. If you go to the command line and **ping acme.com" the reply should be 192.168.0.4. If not, your PC is not checking the host file or the host is not formatted correctly. – Seanchán Torpéist Apr 8 '10 at 11:27
0

Pretty easy to do - set your laptop to use your W2K8 server as its DNS server. Enable DNS on the server and create a CNAME record for www.acme.com.

Your server will then intercept www.acme.com DNS requests and serve up its own IP address.

LMHosts is or rather was used for WINS, not relevant in this scenario.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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