Since IIS uses the DNS alias in the URL and that can easily be spoof by
modifying your HOSTS file, I use a Java class if I need to identify a
machine (like for environmental changes).
InetAddress = createObject("java", "java.net.InetAddress");
hostName = InetAddress.getLocalHost().getHostName();
> What exactly is cgi.server_name expected to return?
The thing about CGI variables is that these expectations can be pretty
vague. CF doesn't control them; they're controlled by the web server
and/or the operating system. I would generally expect it to return the
server hostname, IP address or D
Ian Skinner wrote:
> I think I can get the answer faster from this helpful and generous group
> of people then I can write one line of code and try it out on a wide
> variety of environments.
It depends on the web server. IIS should return whatever is in the
"domain" part of the URL the user
I thought I'd add to this:
http://134.139.143.25/stompy/server.cfm
http://cfdev.cota.csulb.edu/stompy/server.cfm
http://servername/stompy/server.cfm
http://servername.ad.dns.entry/stompy/server.cfm
http://localhost/stompy/server.cfm
all return:
CGI.SERVER_NAME: cfdev.cota.csulb.edu
I do have th
Adrian Lynch wrote:
> calpip-devsite/index.cfm calpip-devsite
> calpip.cdpr.ca.gov/index.cfm calpip.cdpr.ca.gov
> calpip-devsite.inisde.cdpr.ca.gov/index.cfm
> calpip-devsite.inisde.cdpr.ca.gov
> 10.104.106.113/index.cfm
calpip-devsite/index.cfmcalpip-devsite
calpip.cdpr.ca.gov/index.cfmcalpip.cdpr.ca.gov
calpip-devsite.inisde.cdpr.ca.gov/index.cfm
calpip-devsite.inisde.cdpr.ca.gov
10.104.106.113/index.cfm10.104.106.113
134
http://134.139.143.25/stompy/server.cfm
or
http://cfdev.cota.csulb.edu/stompy/server.cfm
both return:
CGI.SERVER_NAME: cfdev.cota.csulb.edu
It looks like it returns the name registered in the web server (apache,
in my case). The above addresses both go to the same server.
Mike
Ian Skinne
7 matches
Mail list logo