[svlug] Re: virtual domain names inside the LAN [SOLVED]

Daevid Vincent daevid at daevid.com
Wed Aug 28 03:58:49 PDT 2002

> Why not try and find out.  It's an instant change: once you 
> edit and save, the effect is immediate.  You can always edit it back.
> The answer, though, is yes, you can put them on several lines like so:

Drew thank you so much. I guess I was afraid to try it since the box is
live and I didn't know if it would screw up anything to the outside
world. But yes, I actually was going to experiment one night at some
off-peak hour. You just answered me sooner than that. Thank you so much.

Well, maybe this will help somebody so they don't go set up DNS when
they don't need to (no offense to Ira, that was a valid suggestion, and
probably a worthwhile project, but overkill for this situation IMHO, not
to mention a bunch of downtime I'm sure as I 'learned' how DNS and BIND
worked). I sent this info off to the Netgear support folks, so they can
tell others as well rather than suggesting that I set up DNS too.

As Drew states, you can simply add all the entries into your Linux box's
/etc/hosts file like so and restart networking with
"/etc/rc.d/init.d/network restart" (maybe that isn't required, but I did
it anyways just in case ;-) ):	daevid.com www.daevid.com ftp.daevid.com daevid	daevid.net www.daevid.net ftp.daevid.net	daevid.org www.daevid.org ftp.daevid.org	daevidvincent.com www.daevidvincent.com
ftp.daevidvincent.com daevidvincent	daevidvincent.net www.daevidvincent.net
ftp.daevidvincent.net	daevidvincent.org www.daevidvincent.org
ftp.daevidvincent.org	marq.org www.marq.org ftp.marq.org marq	theOctane.com www.theOctane.com ftp.theOctane.com
theOctane	VRTradeshow.com www.VRTradeshow.com ftp.VRTradeshow.com
VRTradeshow	VRExhibits.com www.VRExhibits.com ftp.VRExhibits.com

And also do the same for WinXP's "hosts" file
C:\windows\system32\drivers\etc\hosts or any other boxes you need this
'fake DNS' for.

I figure since these are all Virtual hosts on my machine and ones I will
be maintaining anyways (I have to manually put them in Apache's
httpd.conf and /etc/mail/* so one more file isn't going to hurt), this
solution is the most elegant and simplest at the same time. And so far
it's working like a charm. It's lightning fast for lookups (obviously)
and so even developing and coding is way faster when I'm dev on WinXP
(homesite/dreamweaver/etc.) and testing the PHP pages on Linux. Sweet. 

Now Linux knows about itself and it's virtual hosts, and all the other
windows boxes know the right names too. Perfect. Exactly what I wanted.

One remaining question. Is it bad practice or is there any
benefit/detriment to using vs. for ALL those
IP's? That is, should I switch them all on /etc/hosts to since
it is the same machine as localhost anyways?

Thanks again,


More information about the svlug mailing list