Host file for browser?

Fred puissante at biz.puissante.com
Fri Dec 10 00:24:01 EST 2004


An alternative to using host files, especially if you have many machines
on your LAN you want to point to your LAN web server is to set up a name
server on one of your Linux boxes.

You can manage your name server by installing Webmin, which makes this
almost painless. Then you have to configure all your other boxes to use
that Linux server as the name server. At this point, you can set up
forwarding on the name server to pass requests along to other name
servers, and you can define domain names only your LAN will care about.

My own set up has a Linux box acting both as the name server and as the
DHCP server -- which is also managed by Webmin. I use the DHCP server to
hard-associate IPs to MAC addresses, and use the name server to
associate names to those IPs. Works like a champ, and eliminates the
problems with keeping all those tedious host files everywhere in sync.

If you are developing multiple websites like I am, there is an added
benefit -- you can use wildcarding in the name server on you LAN to
create secondary "domains" for the many different sites on the fly. For
instance, I have *.jupiter defined so I can do xf.jupiter, fff.jupiter,
csw.jupiter, etc. just by configuring apache for each test site. You
cannot do wildcarding with host files. And of course, now that all boxes
on my LAN use the name server, they all see the wildcarded sites, aiding
in further testing.

My approach will be overkill if you only have one or two machines on
your lan and only one website you are testing. But it's fun nontheless.

-- 
Fred -- fred at lrc.puissante.com -- place "[hey]" in your subject.
The mass of humans on planet Earth -- regard them as the ebbing 
seas in the winds of change. They ebb, they flow, they know not 
where to go.




More information about the gnhlug-discuss mailing list