[CLUE-Tech] simulating DNS function

Angelo Bertolli angelo at freeshell.org
Mon May 10 09:43:57 MDT 2004


> You can change your /etc/hosts file on your local machine you're using
> to hit the server with so it'll report different names to the webserver
> when you connect... that's one workaround...
>
> Something like :
>
> 192.168.10.1   name1.virtualhost.net
> # 192.168.10.1    name2.virtualhost.net
> # 192.168.10.1    name3.virtualhost.net

Or just:

192.168.10.1 name1.virtualhost.net name2.virtualhost.net
name3.virtualhost.net

(All one line.)

I don't really consider this a "workaround" at all.  This is what the
hosts file is for, and this is the best way to do testing BEFORE something
goes into production.

> There's various workarounds... but nothing 100% clean.  Add SSL to the
> mix and it becomes a complete mess without multiple public IP's because
> of the reverse DNS matching requirements of SSL-enabled browsers.
> (Unless you like your users seeing SSL error messages or they don't care...)

Actually, since you can't do virtual name-based SSL anyway with a
certificate authority, you'd have to have more IP's anyway.  Which just
means you'd map multiple IP's to domain names in your hosts file.

On a side note, does anyone know where this hosts files exists in Windows?
I'm 90% sure there IS one somewhere, but it might not be called "hosts."

Angelo



More information about the clue-tech mailing list