Skip Content

Articles

How To Configure DNS on a Windows LAN

I figured this out after growing tired of having to remember a bunch of IP's for different sites I was developing at home.

This will work with IIS, Apache, Tomcat and I'd assume any other server software. This artice assumes you already have your server configured with a separate IP for each site.

It's simple really, you basically just need to edit your HOSTS file. In Windows XP it's located in:
C:\WINDOWS\system32\drivers\etc
I believe in Win-2000 it's
C:\WINNT\system32\drivers\etc
Or something similar, you get the idea. You can always search for HOSTS if you can't find it.

The basic format is this:
127.0.0.1 localhost
If you have KaZaA-Lite installed you'll see alot more entries which block the ads. All you need to do is add a line for each site you want to access, like so.
127.0.0.1 localhost
192.168.100.100 sitename
192.168.100.101 othersitename

Save the file, and that's it. You can now type sitename in your browser and it will point directly to the ip you entered in the host file.

If you don't have a network and still want to do this on your development computer, you can do it like so:

127.0.0.1 localhost
127.0.0.2 sitename
127.0.0.3 othersitename

And so on. I've only tested this method on Apache, but I'd assume it works with IIS too, assuming the sites are configured properly.

I'll be posting an article on configuring Apache and IIS for multiple site development soon.

Added On: 2003-10-11

  

Learning PHP 5

Learning PHP 5

David Sklar

O'Reilly & Associates

Usually ships within 24 hours

Our price: $20.37

 

508 | XHTML 1.0 | CSS 2.0 | PHP 5.2.11 | MySQL 5.0.89 | RSS 2.0 | Print

Copyright © 2010 Chris Martin