> > > >> What variable holds the IP address of a server?
> > > >>
> > > > CGI.REMOTE_ADDR
> > >
> > > Umm.. that's looks like my IP. Not the IP of the server.
> >
> > That's correct. There's no CGI variable which exposes any meaningful
> > information about the IP address or DNS entry for a server.
>
> what about CGI.HTTP_HOST or CGI.SERVER_NAME?
> 
> they tell you the server's domain name, which you could one 
> of the TCP CFX tags to ping to get the IP.

These are only as reliable as the information they're fed by the browser.
For example, if I wanted, from my browser, to put a specific value in those
variables, I can do that. I need only edit my hosts file to give whatever
name I want to the appropriate IP address. The only way to know that the
name used by the browser is the appropriate name is if you're using
name-based virtual servers, which will only accept requests that provide the
appropriate name.

Also, in a clustered environment, these variables may provide the external
name used to reach the cluster, rather than a name corresponding to a
specific server.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to